I want to use Aspose library to convert chunk of data to excel schema format so it can be uploaded on amazon s3 as .xlsx and .csv. I am trying to write millions of rows to amazon s3 with either excel (.xlsx) or
csv format. Please help me.
Aspose.Cells provides some data importing options (from different data sources, e.g. Array, ArrayList, DataTable, custom objects, etc.), so you may choose one (based on your data source) to import data into Excel spreadsheet for your requirements. Please see the document for your reference:
Import Data into Worksheet
Alternatively you may use LightCells APIs model (see the document on LightCells APIs) to insert data row by row in even driven mode. You can write your own code by yourselves. This mode is useful to write large data into Microsoft Excel worksheet. This may surely consume less memory and can give you better performance and efficiency.
Hello,
I am writing large excel file millions of rows. I get workBook object I want to upload this object into amazon s3 without using Memory stream. How can I do it. Please help.
We are not sure about your requirements. We also do not know how you upload your common data to s3 either. But, please note, if you can send common binary data to s3 by streams or some other means, you should be able to do it in the similar way by Workbook.Save(Stream,…) or other way around.
Hi Amjad,
I am using LightCells API for generating Excel and it works fine. But when I try to save it as CSV it does not work Below is the sample code. Please share sample code to generate csv using light cell api.
OoxmlSaveOptions ooxmlSaveOptions = new OoxmlSaveOptions();
ooxmlSaveOptions.LightCellsDataProvider = new DataProvider(wbExport, data.Count(), 37, data);wbExport.Save(path, ooxmlSaveOptions);
See the sample code segment for your reference:
e.g.
Sample code:
TxtSaveOptions csvSaveOptions = new TxtSaveOptions(SaveFormat.Csv);
csvSaveOptions.LightCellsDataProvider = new DataProvider(wbExport, data.Count(), 37, data);
wbExport.Save(path, csvSaveOptions);
Hope, this helps a bit.