Read an Excel table
am_tableReads Excel tables from statistical releases as compact rows: call with an id to list sheets, then filter by sheet, text, and paging to extract specific data from xlsx/xls files.
Instructions
Read an Excel table of a statistical release as compact rows (works for any release with an xlsx/xls file).
First call with just the id: you get the sheet list with sizes and titles. Then pass sheet; rows come as
[excel_row_number, cell, cell...] with empty rows removed. Use find to pick rows (e.g. a province or a group
name), offset to page and col_offset for wide monthly series (the newest values are usually at the right
end: see cols in the answer). Files over 25 MB are refused.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Release id from am_search or am_release | |
| file | No | Which Excel file of the release (1-based, see am_release) | |
| find | No | Only rows that contain this text in any cell | |
| sheet | No | Sheet name or 1-based number. Omit to list the sheets first. | |
| offset | No | Skip this many matching rows (for paging) | |
| max_cols | No | Columns to return | |
| max_rows | No | Rows to return | |
| col_offset | No | Skip this many columns on the left (wide time series) |