Hi, @JPey
Thanks for your quick response and sorry for my delay response due to weekend.
If you do not have a table in Excel . One way is you can make it a table manually.

Secondly , you need to use the run Office Script to create a table in Your Excel file because this action need to have a table in our Excel File.
function main(workbook: ExcelScript.Workbook) {
let selectedSheet = workbook.getActiveWorksheet();
let newTable = workbook.addTable(selectedSheet.getUsedRange(), true);
}
Best Regards,
Yueyun Zhang
@JPey