Repair defects in workbook bytes, reporting every change as a loss.
Use describe("xlsx.repair") when your code needs the complete live JSON Schemas.
At a glance
| Property | Value |
|---|---|
| Package | @runstamp/xlsx |
| Domain / verb | xlsx / repair |
| Customer jobs | repair, transform |
| Deterministic | Yes |
| Side effects | none |
Availability
| Local | SDK | CLI | MCP | Managed API |
|---|---|---|---|---|
| public ga | public ga | public ga | public ga | public ga |
Managed API route: POST /api/v2/operations/xlsx/repair. Managed execution requires a free-trial workspace or an active Platform or Enterprise workspace, and an environment-bound API key.
Input and result
| Schema | Required fields | Optional fields |
|---|---|---|
| Input | none | none |
| Options | none | deterministic, deterministicSeed, timeoutMs, locale, lossPolicy, limits |
| Result value | bytes, mediaType, extension, byteLength, hash | none |
Every success also carries losses, diagnostics, and a hash-bound receipt.
Defaults, limits, and format constraints
Defaults
| Path | Default |
|---|---|
$.deterministic | default=true |
$.lossPolicy | default="collect" |
Formats and profiles
No separate format selector is declared. Accepted artifacts are bounded by the exact input schema.
Other limits
| Path | Constraint |
|---|---|
$.timeoutMs | minimum=1 |
$.limits.maxInputBytes | minimum=1maximum=67108864 |
$.limits.maxOutputBytes | minimum=1maximum=134217728 |
$.limits.maxPages | minimum=1maximum=1048576 |
$.limits.maxElements | minimum=1maximum=1000000 |
$.limits.maxArchiveEntries | minimum=1maximum=2000 |
$.limits.maxExpansionRatio | minimum=1maximum=1000 |
$.limits.maxDurationMs | exclusiveMinimum=0maximum=600000 |
Invoke
const input = await fetch("https://runstamp.com/demo-evidence/operation-evidence/xlsx/xlsx.repair/input.json").then((response) => response.json());
const result = await runstamp.run("xlsx.repair", input);
if (!result.ok) throw new Error(`${result.error.code}: ${result.error.remediation}`);
console.log(result.value, result.losses, result.diagnostics, result.receipt);curl -fsS https://runstamp.com/demo-evidence/operation-evidence/xlsx/xlsx.repair/input.json -o input.json
npx -p @runstamp/sdk runstamp ops invoke xlsx.repair --input input.json{
"tool": "runstamp_invoke_operation",
"arguments": {
"operation": "xlsx.repair",
"input": "<JSON from https://runstamp.com/demo-evidence/operation-evidence/xlsx/xlsx.repair/input.json>",
"execution_mode": "local"
}
}Errors and losses
Declared errors (10)
common/SCHEMA_REJECTEDcommon/CONTRACT_VIOLATIONcommon/OPERATION_CANCELLEDcommon/OPERATION_TIMEOUTcommon/RESOURCE_LIMIT_EXCEEDEDcommon/INPUT_CORRUPTxlsx/TEMPLATE_PARSE_FAILEDxlsx/TEMPLATE_ASSEMBLY_FAILEDxlsx/XLSX_XML_UNSAFExlsx/LOSS_POLICY_VIOLATED
Declared losses (22)
xlsx/MACRO_STRIPPEDxlsx/EXTERNAL_CONNECTION_STRIPPEDxlsx/FORMULA_REFERENCE_BROKENxlsx/NAMED_RANGE_DEADxlsx/HYPERLINK_TARGET_INVALIDxlsx/MERGE_OVERLAPxlsx/MERGE_OUT_OF_BOUNDSxlsx/SHARED_STRING_INDEX_INVALIDxlsx/STYLE_INDEX_INVALIDxlsx/RELATIONSHIP_TARGET_MISSINGxlsx/CHART_DATA_MISSINGxlsx/TABLE_REFERENCE_INVALIDxlsx/TABLE_RELATIONSHIP_BROKENxlsx/RANGE_REFERENCE_CLIPPEDxlsx/SHEET_NAME_SUBSTITUTEDxlsx/TABLE_NAME_SUBSTITUTEDxlsx/AUTOFILTER_SUBSUMED_BY_TABLExlsx/AUTOFILTER_DROPPED_FOR_TABLExlsx/TABLE_HEADER_NORMALIZEDxlsx/REPAIR_INCOMPLETExlsx/DIMENSION_MISMATCHxlsx/UNCLASSIFIED_CONDITION
SDK AbortSignal, CLI exit 130, and MCP cancellation return the typed common/OPERATION_CANCELLED failure envelope.
Verified example and exact contract
- Fixture:
icp-workflow(Compliance-remediation workbook with a controlled duplicate package relationship). - Example input — SHA-256
f7b02acdf0b510947c380c1d0c5d478dc6829634d969bb2159b34f0adc12b4df. - Example result — SHA-256
f4b4266ca255908a149bea009216bed336cfae18c34d8155f65203a84770501e. - Verified result SHA-256:
c230e1cee4b958dc9421b69e0dac5b9ba7061181d41c20128ecbff043f4a70ac. - Qualification lane:
11-pdf-xlsx.
Contract fingerprints
- Descriptor:
978fc7e3f804a0e1a331bc8277308239974093678daf40bab4332f2fab7316c7. - Input schema:
e324b382afd54816a06a70cb857891b4f50c543e5aa90c4be731138c61c05d50. - Options schema:
fdfd7767a0e2fe0da1244a2af2b1ff6b98afc16ecea71968651a31d5feaa8c74. - Result value schema:
62867c278e77e4ce2f21969005e458e5dfe2c2d3ddf011b75a39e846f97c7b1a.
The machine-readable operation reference publishes the complete schemas, qualification results, and evidence bindings for every operation.