The following function returns the data of Table1 excluding the headers:
function main(workbook: ExcelScript.Workbook) {
let ws = workbook.getWorksheet("Sheet1");
return ws.getTable("Table1").getRangeBetweenHeaderAndTotal().getValues();
}
How do I get it to return ALL the data, including the headers?
Please try.
Microsoft documentation: