xlsx_read
Read uploaded .xlsx/.xls/.csv/.json files or live Google Sheets as markdown, JSON, or SQL text so AI agents can inspect and process spreadsheet data.
Instructions
Use this when you need to read a spreadsheet as text (markdown, JSON, or SQL) — from an uploaded .xlsx/.xls/.csv/.json file, or from a live Google Sheet by ID using source:"gsheets", spreadsheet_id, and access_token: a Google OAuth bearer already scoped for Sheets read access that the caller must supply. This connector's own Google sign-in is account login only and does not grant one — for a user who only has a shared link, pass it as file_url instead. format:"json" emits one object per sheet row, with a "row" field (the real 1-based sheet row number) and one key per column letter (A, B, ...); it carries values only, so a formula cell contributes its computed value rather than the formula text, styles and number formats do not survive (except as display text under value_format typed_with_text, below), and dates arrive as ISO-8601 strings because JSON has no date kind. A .csv is read the way Excel opens one (en-US): numbers (including 1,234.50, $5, 50% and (5)), TRUE/FALSE and dates (M/D/YYYY, YYYY-MM-DD, 15-Jan-2024, with an optional time) are typed values, read as an .xlsx cell of that type would be (display formats are not carried); ids with a leading zero (00123), digit strings longer than 15 digits and text that only looks numeric in another locale (1.234,56) stay text, and an empty field is a blank cell. Pass options.header_row:true with format:"json" to get rows keyed by the header row's values (e.g. {row:2, email:..., name:...}) instead of column letters; the header row itself is left out, so offset and maxRows count data rows, and duplicate or blank headers get unique names (a repeat becomes Name_2, a blank header becomes its column letter). For a messy export with a title, blank rows or notes above the header, pass options.header_row_auto:true (the header row xlsx_data_clean would find, row 1 when none) or options.header_row_number such as 3 (row 3 is the header, data starts at row 4), not both; _meta.header_row_used names the row used. An error cell (#N/A, #DIV/0!, #REF!, #NAME?, #VALUE!, #NUM!, #NULL!, #SPILL!, #CALC! and the other Excel error values) keeps its error code as the cell value and is also named in that row's "errors" object (same keys as the row: column letter, or the header name with header_row), so it reads differently from a text cell holding the same characters; rows with no error cells have no "errors" key. Set options.formulas:true to get formulas in any format, for the formula cells of the returned page, shared formulas expanded, paging with options.offset and options.maxRows: markdown adds a " formula" line under each row that holds formulas, with each formula (= first) in its column; sql adds a "-- formula D2: =A2+1" comment after that row's statement; json adds formulas_by_cell next to rows, each formula cell by A1 ref (for example "D2") to its formula text without the leading =; in markdown and sql a backslash, line break or (markdown) pipe inside a formula is written \, \n, \r or |. Set options.value_format:"typed" with format:"json" to get typed values instead of display text: numbers as JSON numbers, TRUE/FALSE as true/false, a blank cell as null (every row then has a key for every used column of the sheet), dates as ISO-8601 strings and text as strings (an id with a leading zero stays text); the default, "text", is unchanged. Set options.value_format:"typed_with_text" with format:"json" to get each cell as {v, t, text}: v the typed value, t its type (number, string, boolean, date, error or blank) and text what Excel shows under the cell's number format (for example {"v": 1234.5, "t": "number", "text": "1,234.50"}, and "00123" keeps its zeros); a CSV field's text is the field as written, and where the text cannot be shown exactly it is left out and text_unavailable is true. In markdown, md cells are escaped: a backslash, pipe or line break in a cell or header is written \, |, \n or \r, so a value never shifts a column or starts a new row, and a line break in a sheet-name heading is written \n or \r.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>"
},
"name": "xlsx_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet | No | Sheet name or index (default: all sheets). | |
| format | No | Output format. Use "md" (markdown table, default), "json" (structured rows), or "sql" (CREATE TABLE + INSERTs). Synonyms: "markdown"→"md", "text"→"md". | md |
| evaluate | No | Evaluate formulas server-side (default: false). | |
| file_path | Yes | Absolute path to the .xlsx file. Pass the path string AS-IS — do NOT read, open, or base64-encode the file; the client handles all file I/O. The base64 surface in this connector is OUTPUT-only (_meta.file_b64). |