Skip to content Skip to sidebar Skip to footer

How To Maximise Performance For Table Row Addition Of 50k+ Rows Using Excel Javascript Api Office Add-in

I m trying to add large number of rows to table. My Project has requirement for large table addition. Please let me know if there is a better alternative to maximize performance. S

Solution 1:

It will be more efficient to add your rows in as large a block (array of arrays) as possible rather than a single row at a time. Also if you have any formulas in your workbook you need to be in Manual Calculation mode (unfortunately for some reason you cannot set Calculation Mode from the Office-JS API) or try to use the nearest equivalent which is suspendCalculationUntilNextSync()

See my blog post on EXcel JS Read-Write performance for more details: Excel JS Read-Write Performance

Solution 2:

As Charles mentioned, updating the underlying range of the table body will result in better performance. This does mean that table should be enabled to auto expand, which is the default setting. There is an ongoing investigation and engineering work regarding the table update performance. You can monitor for updates here.

Post a Comment for "How To Maximise Performance For Table Row Addition Of 50k+ Rows Using Excel Javascript Api Office Add-in"