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

Free Support Forum - aspose.com

Evaluating Aspose.cells - lots of memory required for reading from large files

Hi, I have a large excel file(100meg) which I need to extract values from. I downloaded aspose.cells and created a small sample program:

Workbook workbook = new Workbook(“c:\largefile.xls”);
foreach (Worksheet sht in workbook.Worksheets)
if (sht.IsVisible == true)
Object[,] vals2 = sht.Cells.ExportArray(0, 0, sht.Cells.MaxRow + 1, sht.Cells.MaxColumn + 1);

when I run this program the memory usage is very very high. Is there a better way to read these values? Is there anyway I could read from a stream x bytes at a time rather than having to load the whole file up? All I want to do is read from the file, no writing at all. Could the file possibly be read worksheet at a time??

I’m looking to use this product on a server and large memory spikes like this would worry me as I would have multiple instances of this program running.

Thanks, Paul

Hi Paul,

By default, Aspose.Cells loads the whole spreadsheet into
memory but we can load desired sheets in a workbook as per requirements.
May be you can load individual worksheets and then read data from it. Please check this link for details http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/load-only-specific-sheets-in-a-workbook.html