# Xlsx inspect

`xlsx-inspect` · version 1.0.0 · Other utilities · free, no key needed

inspect excel workbook structure.

**Use when you need to: inspect excel workbook structure · list xlsx sheet names and dimensions · count uncached spreadsheet formulas.**

## Decide before calling

Read the [versioned contract](/v1/tools/xlsx-inspect/versions/1.0.0) and the supported scope below. Reuse `xlsx-inspect@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `xlsx-inspect@1.0.0` for inspect excel workbook structure. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- inspect excel workbook structure
- list xlsx sheet names and dimensions
- count uncached spreadsheet formulas
- inspect shared string count
- read excel metadata properties
- inspect spreadsheet cached data dimensions

## Not supported

- ZIP64, encrypted archives, compression other than stored/deflate, or non-UTF-8 legacy filenames
- Formula execution, style-based dates, charts, macros, full workbook validation, or unrestricted Excel coverage

## Behavior

- Canonical standard Base64 only; decoded input <=2048 bytes. Unknown keys and malformed Base64 are invalid_input. Declared or actual resource excess is limit_exceeded.
- Single-disk ZIP supports stored/deflate and ASCII or UTF-8 names. All entry CRCs and actual sizes are verified, including entries not selected for extraction. ZIP64, encryption, other compression methods and non-UTF-8 legacy names are unsupported_input; duplicate/unsafe paths and inconsistent metadata are invalid_input.
- At most 6 entries, 128 UTF-8 bytes per name, 2048 expanded bytes per entry and 4096 expanded bytes per archive. DTD is forbidden. XML uses ASCII qualified names, UTF-8 text, XML 1.0 characters, <=2048 bytes per part, depth16 and 128 cumulative element/text nodes per call; parsed identical XML parts are cached.
- SpreadsheetML Transitional Office relationship URIs; cached values only, no formula execution, style-based date conversion, charts, macros or full validation.
- First physical grid row becomes header; empty sparse cells padded across A1:maxRef before projection, cumulative cell charge BEFORE dense allocation.
- CSV defaults first sheet and exact optional sheet name; LF records with RFC4180 comma/quote/CR/LF escaping, UTF-8 text. Markdown defaults all sheets with safe escaped sheet headings.
- Recognized types n,s,inlineStr,b,e,str only; booleans0/1 strict; shared indexes nonnegative decimal integers; unknown types unsupported_input; duplicate cell refs and sheet names invalid_input.
- All sheets load and consume cumulative parsing/cell budget even when one is selected; repeated reference may reuse parsed XML but still charges dense projection each time.
- No date/formula evaluation; integer text never coerced through IEEE754; fractional/exponent/error/cachedformula/merged handling disclosed through warnings.
- Phonetic annotations are omitted with a warning; rich-text runs retain their text. Optional sheet selection is exact, not fuzzy or positional.
- XLSX-specific total XML node allowance128 is enforced before node creation, across main/root relationships, workbook, worksheet, shared strings and inspected metadata; identical text is parsed once.
- Supplied sheet must be a nonempty string; null is invalid_input. Six ZIP entries and other bounds may restrict the number of representable sheets below the soft maximum4.
- Central ZIP filename raw bytes beginning EF BB BF are outside the subset: 422 unsupported_input before UTF-8 decoding or normalized duplicate lookup, including selected/unselected/directory entries, central-only mismatch and BOM/plain duplicates after existing preceding checks. A plain central name with only its local name BOM-prefixed retains 400 invalid_input/local-central filename mismatch. Noninitial U+FEFF filename content, leading XML payload BOM handling and literal cell-text U+FEFF stay unchanged.

## Input

- `bytes_base64` (string, required): min length 4; max length 2732

## Output

- `format` (constant "xlsx", required)
- `metadata` (object, required)
- `shared_strings` (integer, required): min 0; max 128
- `sheets` (array of object, required): min items 1; max items 4
- `warnings` (array of string, required): max items 32; each max length 512

## Limits

- max base64 chars: 2732
- max decoded bytes: 2048
- max archive entries: 6
- max entry uncompressed bytes: 2048
- max archive uncompressed bytes: 4096
- max zip name bytes: 128
- max xml bytes: 2048
- max xml depth: 16
- max xml nodes cumulative: 128
- max table rows: 128
- max table columns: 32
- max table cells cumulative: 128
- max output bytes: 8192
- max sheets: 4
- max sheet name bytes: 256

## Example

Request input:

```json
{
  "bytes_base64": "UEsDBBQAAAAIAAAAIVzEvLXpeQAAAI8AAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbCWOMQ7CMAxFr1JlRSQXSLuwAwMXMIkjosZ2lLil3J4Wprf89/X841OxT/62Yms54nCHplcgHI3bintLm58is92omOEirMh6KKOBWksOoFnYrRytVOR9laQRaD9LSjlglLDQrthe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250ZW50X1R5cGVzXS54bWxQSwECFAAUAAAACAAAACFcSLgNE3kAAACrAAAACwAAAAAAAAAAAAAAgAGqAAAAX3JlbHMvLnJlbHNQSwECFAAUAAAACAAAACFcgiStdIoAAADXAAAADwAAAAAAAAAAAAAAgAFMAQAAeGwvd29ya2Jvb2sueG1sUEsBAhQAFAAAAAgAAAAhXIPcXI54AAAApgAAABoAAAAAAAAAAAAAAIABAwIAAHhsL19yZWxzL3dvcmtib29rLnhtbC5yZWxzUEsBAhQAFAAAAAgAAAAhXKNNVoeoAAAAPwEAABQAAAAAAAAAAAAAAIABswIAAHhsL3dvcmtzaGVldHMvczAueG1sUEsFBgAAAAAFAAUAQQEAAI0DAAAAAA=="
}
```

Response:

```json
{
  "result": {
    "format": "xlsx",
    "metadata": {},
    "shared_strings": 0,
    "sheets": [
      {
        "name": "Sheet1",
        "rows": 2,
        "columns": 2,
        "formulas_without_cached_value": 0
      }
    ],
    "warnings": []
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "xlsx-inspect",
  "version": "1.0.0",
  "input": {
    "bytes_base64": "UEsDBBQAAAAIAAAAIVzEvLXpeQAAAI8AAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbCWOMQ7CMAxFr1JlRSQXSLuwAwMXMIkjosZ2lLil3J4Wprf89/X841OxT/62Yms54nCHplcgHI3bintLm58is92omOEirMh6KKOBWksOoFnYrRytVOR9laQRaD9LSjlglLDQrtheG0LsL0SlYn+0BJlPx7GbvPt3fAFQSwMEFAAAAAgAAAAhXEi4DRN5AAAAqwAAAAsAAABfcmVscy8ucmVsc12OQQ7CIBBFr9JwgE7jwoWBrty4NV5gxKGQAkNgGuvtZVldvuTnva/vFFEC5+ZDabM+4nB7GZUwZDU8PoWM8iLlAtCsp4Rt5EJ5T9FxTSgd6wLsXLB0ZbslygKnaTpDPRb+Ft2MdSExao/w5ro+mdexSxXMGn6/fQFQSwMEFAAAA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5yZWxzUEsBAhQAFAAAAAgAAAAhXKNNVoeoAAAAPwEAABQAAAAAAAAAAAAAAIABswIAAHhsL3dvcmtzaGVldHMvczAueG1sUEsFBgAAAAAFAAUAQQEAAI0DAAAAAA=="
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/xlsx-inspect/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d @input.json
```

The machine-readable contract is at [/v1/tools/xlsx-inspect/versions/1.0.0](/v1/tools/xlsx-inspect/versions/1.0.0).

### CLI

```sh
node cli.mjs run xlsx-inspect 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Xlsx to markdown](/tools/xlsx-to-markdown): convert excel workbook to markdown.
- [Xlsx to CSV](/tools/xlsx-to-csv): convert excel sheet to csv.
