Hi everyone,
How can i get last row dynamically using office script.
I'm running the office script automatically on the file added to SharePoint library.
The example of file

The excel file might content some text and some table data and some text below the table data. The script will remove the top text and then add table to the table data. How can i find the last row of the table data?
let table1 = workbook.addTable(selectedSheet.getRange("C3:F6"), true);
The value of F6 should be dynamically set. Example it could be F10.
The goal is to extract the table data from the uploaded excel file then insert them into SharePoint list.
Thank you