In normal operation, I need to download the dataset from my company database and compute it in excel. I would like to automate it by using ExcelOnline and follow this link: https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Cross-Reference-and-formatting-two-Excel-files-using-Office/td-p/728535. It is because my company only allows us to use excel...
I tried some OfficeScript. Since my dataset is super big. I can't find a solution in the document.
Can anyone give me some advices?
My code:
function main(workbook: ExcelScript.Workbook): RawData[] {
let lastRow = workbook.getWorksheet('DETAIL').getUsedRange().getRowCount();
let rows = workbook.getWorksheet('DETAIL').getRange('A3:CQ' + lastRow).getValues();
let records: RawData[] = [];
for (let row of rows) {
let [ORNo,SubNo, ... , LineNo,ProductionLine] = row; //95 Columns 21619rows(including header)
records.push({
ORNo: ORNo as string,
SubNo: SubNo as number,
...,
LineNo: LineNo as string,
ProductionLine: ProductionLine as string
})
}
console.log(JSON.stringify(records))
return records;
}
interface RawData {
ORNo: string
SubNo: number
...
LineNo: string
ProductionLine: string
}
It gives: Line 3: Range getValues: The response payload size has exceeded the limit. Please refer to the documentation: "https://docs.microsoft.com/office/dev/add-ins/concepts/resource-limits-and-performance-optimization#excel-add-ins".