excel_read_sheet
Read cell values from an Excel sheet, optionally limited to a cell range. Empty cells are returned as empty strings for JSON compatibility.
Instructions
Read cell values from a sheet, optionally limited to a range.
Args:
path: Path to an existing .xlsx.
sheet: Name of the sheet to read.
range: Optional cell or range reference. Accepts:
* ``None`` — read the entire used range
(``ws.max_row`` × ``ws.max_column``).
* ``"A1"`` — read a single cell; the result is a 1x1 list
``[[value]]``.
* ``"A1:C3"`` — read a rectangular range. Reversed ranges
(``"C3:A1"``) are rejected.
Column letters may be lower-case or upper-case.
folder: Optional base folder for relative paths.Returns:
A 2D list of values. Empty cells (None) are normalised
to the empty string "" so the result is JSON-friendly.
Raises:
OfficeMCPError: ERR_FILE_NOT_FOUND if the file is
missing, ERR_SHEET_NOT_FOUND if sheet is not in
the workbook, ERR_CELL_PARSE for malformed
range, ERR_UNSUPPORTED_FMT for non-.xlsx
extensions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| sheet | Yes | ||
| range | No | ||
| folder | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |