Free Support Forum - aspose.com

Performance Queries

Hi,

This post is related to performance in inserting columns or rows in Aspose workbook.

I am using Aspose.Cells.1.9.4.13 for Java.

In my scenario, I am inserting rows or columns one by one in a 'for' loop e.g. if I have 10 columns to insert I will call insertColumn(....,1), 10 times.

Can there any performance improvement if I do insertColumns(...,10) only once instead of 10 different times?

More suggestions are appreciated.

Thank You.

Regards,
Kailas

Hi Kailas,

The method Cells.insertColumns(int, int) and Cells.insertRows(int, int) do support insert more than one column/row at a time, you can simply set the second int value as the count of columns/rows you want to insert. It is sure performance of calling insertColumns/insertRows(pos, count) is better than calling insertColumns/insertRows(pos,1) count times.

Hi,

What is the performance measure in
1. Opening excel as WorkbookDesigner and then getting workbook from designer
2. Opening excel as workbook.

Thank You.

Regards
Kailas

Hi Kailas,

Performance are same. WorkbookDesigner internally calls Workbook.open method to open the file.

I see that Cells.insertColumns is an option for the Java version. What do you recommend for .NET?

Hi,

Well, for .NET version, you may try to use Cells.InsertColumn in some loop for your need. And we may consider adding Cells.InsertColumns method in our future versions.

Thank you.