Skip to main content

Excel Workbooks

ERPL-Web reads and writes Excel workbooks living in OneDrive or SharePoint — typed columns (dates inferred from number formats, doubles, timestamps, booleans), inline ranges, and full table-level operations.

Read a worksheet

SELECT *
FROM graph_excel_read(
site => 'finance.sharepoint.com',
workbook => 'sales-2026.xlsx',
worksheet => 'Pipeline'
);

Attach a workbook by name

No GUIDs required — just the site and file name:

ATTACH 'sales-2026.xlsx' AS book (
TYPE excel_workbook,
SITE 'finance.sharepoint.com'
);

SELECT * FROM book.Pipeline;
SELECT region, SUM(amount) FROM book.Pipeline GROUP BY region;

Write back

-- Append rows to a named table
SELECT graph_excel_write(
site => 'finance.sharepoint.com',
workbook => 'sales-2026.xlsx',
worksheet => 'Pipeline',
rows => (SELECT * FROM new_deals)
);

-- Or use COPY TO for batch writes
COPY (SELECT * FROM new_deals)
TO 'finance.sharepoint.com/sales-2026.xlsx/Pipeline' (FORMAT graph_excel_table);

See the function reference for graph_excel_tables, graph_excel_worksheets, graph_excel_range, graph_excel_read, graph_excel_write, graph_excel_delete_rows.