I have a .xlsx with a lot of rows of information, I wonder how can I get the last line of this document?
I'm supposed to be adding more lines to the end of the archive, every month. There is a sample of the script I'm working on:
function main(workbook: ExcelScript.Workbook) {
let selectedSheet = workbook.getWorksheet("sheet");
return JSON.stringify(selectedSheet.getRange());
}
Also tried with:
return JSON.stringify(selectedSheet.getRange().getVisibleView().getValues());
But I'm getting the error:
Converting circular structure to JSON
--> starting at object with constructor 't'
| property 'm_trackedObjects' -> object with constructor 'e'
--- property 'm_context' closes the circle
clientRequestId: 986aa897-d022-43a5-b32e-672524deb8c8
Maybe you can help me with this, thanks!