View Source Sheetex (Sheetex v0.5.0)
For when you just want to fetch some rows from a Google Sheet.
See fetch_rows/2
for more information.
Summary
Functions
Fetch rows from a Google Sheet.
Similar to fetch_rows/2
, but raises an exception on failure.
Convert the result of fetch_rows/2
to a list of maps.
Types
Functions
Fetch rows from a Google Sheet.
This function requires a Google Workspace API key or an OAuth token, which will be passed to the Google Sheets API. See Google’s official authorization docs.
Options
You must provide either key
OR oauth_token
for authorization.
key
– API key.oauth_token
– OAuth token.range
– Use this option if you want to fetch a specific range from a spreadsheet using the A1 notation.
Output
- The output will include a list of rows up to the last non-empty row in the sheet (or from within the specified range).
- For each row, the output will contain a list of cell values up to the last non-empty cell.
Converting rows to key-value pairs
See
to_kv/1
for converting the output into a list of maps.
Similar to fetch_rows/2
, but raises an exception on failure.
Convert the result of fetch_rows/2
to a list of maps.
Values from the first row will be used as keys, unless the headers
option
containing a list of headers is provided. If a column contains an empty header,
all values in that column will be dropped.