greenhillchris
New Member
- Joined
- Mar 5, 2022
- Messages
- 18
- Office Version
- 365
Hi ,
My below Office Script should add an extra 50 rows to a table at row 27.
However I am getting the following error message Line 7: Table addRows: The argument is invalid or missing or has an incorrect format.
This appears to becoing from numRow, where am I going wrong with this code?
1.function main(workbook: ExcelScript.Workbook) {
2.let selectedSheet = workbook.getActiveWorksheet();
3. let table = workbook.getTable("Table1");
4. let startRow = 27;
5. let numRow = 50;
6.
7.table.addRows(startRow,numRow);
8.}
Thanks
My below Office Script should add an extra 50 rows to a table at row 27.
However I am getting the following error message Line 7: Table addRows: The argument is invalid or missing or has an incorrect format.
This appears to becoing from numRow, where am I going wrong with this code?
1.function main(workbook: ExcelScript.Workbook) {
2.let selectedSheet = workbook.getActiveWorksheet();
3. let table = workbook.getTable("Table1");
4. let startRow = 27;
5. let numRow = 50;
6.
7.table.addRows(startRow,numRow);
8.}
Thanks