I want to add multiple rows at a time to table on Excel. Right now we are adding using for loop.
await Excel.run(async (ctx: Excel.RequestContext) => {
sheet = ctx.workbook.worksheets.getItem('sheetName');
table = ctx.workbook.tables.getItem('tableName');
await ctx.sync();
for (let i: number = 0; i < addRowCount; i++) {
table.rows.add();
}
}
Is there API on Office js which allow to insert multiple rows at a time?. I was exploring Excel.Range class. but did not find any helpful one.