Free Support Forum - aspose.com

Parsing Spread Sheet files


#1

Hi, am new to Aspose cells family, can anyone suggest me how to stream the large files , Here my use case is parse large (GB) spreadsheets,so i need to read the workbook by stream it . but i dont know how to do it.


#2

@Sundarcj,

Thanks for your query.

See a few sample code segments on how to load an Excel file from streams:
e.g
Sample code:

    [1]
    FileStream fstream = new FileStream("e:\\test2\\Book1.xlsx", FileMode.Open);
     Workbook workbook = new Workbook(fstream); 
.......

    [2]
    var fileName = @"e:\test2\Book1.xlsx";
     var byteArray = File.ReadAllBytes(fileName);
      var wb = new Aspose.Cells.Workbook(new MemoryStream(byteArray));
    ..........

See the document on how to load/open MS Excel files using different available options provided by Aspose.Cells for your reference:
https://docs.aspose.com/display/cellsnet/Different+Ways+to+Open+Files

Moreover, Aspose.Cells provides some new options e.g MemorySetting.MemoryPreference for memory performance consideration, so you may try it. Please see the topic for your complete reference on how to optimize memory usage while reading/rendering bigger files having large data sets etc.:
http://www.aspose.com/docs/display/cellsnet/Optimizing+Memory+Usage+while+Working+with+Big+Files+having+Large+Datasets


#3

hi @Amjad_Sahi Thank you,
Is there any possibilities to read cell data from workBook
as a output stream


#5

@Sundarcj,

It looks like your streaming workbook requirement is more like parsing cells one by one. We think LightCells APIs should be the proper solution for you, so please give it a try for your needs. See the document on using Light Cells APIs with examples and details for your complete reference:
Using LightCells API

Hope, this helps a bit.