Read cells
xlide_read_cellsRead a range of Excel worksheet cells as values, formulas, both, or displayed text; optionally calculate formulas in memory, returning a grid up to 20,000 cells.
Instructions
Reads a range of cells from a worksheet and returns a grid of values, formulas, both, or the text each cell shows under its number format. On .xlsx, .xlsm and .xlam, values are what Excel last calculated and stored; calculate=true works formulas out in memory with pyOfficeEditor's engine and names cells it could not work out. A failed formatted or rich-text read names the cell and refuses rather than returning an empty value. On .xlsb and .xls, Windows with Excel is required and only calculated values are available, not formulas or formatted text. A partial grid from Excel is refused. At most 20,000 cells per call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet | Yes | Worksheet name, matched without case. | |
| include | No | 'values', 'formulas', 'both', 'text' for what each cell shows, such as 12.5% or 1/15/2024, or 'rich_text' for the font runs of text written in more than one font. | values |
| timeout | No | Seconds allowed if Excel has to answer. | |
| calculate | No | For .xlsx, .xlsm and .xlam, work formulas out in memory before reading. The file is not changed. Binary .xlsb and .xls reads use Excel instead. | |
| file_path | Yes | Absolute path to the Excel file. | |
| cell_range | Yes | A1-style range, such as A1:D50, or a single cell. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||