We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Manually importing data is slow- how do we get it as fast as the builtin Import methods?

We are evaluating Aspose.Cells for .NET and have run into some performance issues. Our data is in custom objects, however they are grouped using LINQ. There are about 17,000 rows with 25 columns (within this set there are over 7000 groups).


Here is what we have observed:
  • In order to properly traverse our records, we iterate through all groups and then all the items in each group and update the cell values using sheet.Cells[x,y].PutValue(data).
  • We believe we are following the best practices mentioned in the docs and this forum (for example, setting values left to right / top to bottom, creating one or two Style objects and setting them to cells as needed, etc).
  • This process takes 10-11 minutes (Core 2 Duo 2.8ghz)
  • When we don’t group our data and use the ImportCustomObjects method, it completes the same amount of data in under 20 seconds.
However, we can’t easily use the ImportCustomObjects method because we insert an extra row with the group name before each group’s items. So my question is, how do we achieve the speed of your Import methods, while still having more control over the imported data and formatting? Can we use multiple threads when setting cell values? Is there anything else we can do to improve performance?

Thanks!

Hi,


Please try the fixed version: v7.0.2.7, if it works efficiently enough.

It would be better if you could use Import Data option given on the page (ImportArray, ImportArrayList, ImportCustomObjects, ImportDataTable etc.), it would give you highest performance.
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/importing-data-to-worksheets.html
To insert an extra rows between sets of grouped data, you may use InserRow() method etc.

Also, if you stick with Cells.PutValue() method, make sure that you are using the best approach regarding performance:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/populate-data-first-by-row-then-by-column.html

If you still find performance issue, kindly create a sample console application, zip it and post it here to show the issue. We will check it soon.

Thank you.