I am using the latest download of Aspose.Cells for .NET, version 7.3.0.0. I am opening a CSV file using the Workbook class. The CSV file is 1.12 MB in disk size, having 6,334 rows and 14 columns.
It takes 2 minutes to open the workbook. The rest of my processing is fine, but two minutes seems excessive just to open the file.
I have attached the file to this post.
My code is as follows:
Aspose.Cells.License asposeLicense = new Aspose.Cells.License();
asposeLicense.SetLicense(“Aspose.Cells.lic”);
LoadOptions loadOptions = new LoadOptions(LoadFormat.CSV);
loadOptions.ConvertNumericData = false;
Workbook wb = new Workbook(_PhysicalFile, loadOptions); // Take 2 minutes here.
Worksheet ws = wb.Worksheets[0];
object[,] dataArray = ws.Cells.ExportArray(3, 0, ws.Cells.MaxDataRow + 1, ws.Cells.MaxDataColumn + 1);
Int32 numRows = dataArray.GetUpperBound(0);
Int32 numCols = dataArray.GetUpperBound(1);
*** The remaining code simply loops through the array, validates the data in each column, and constructs a database record, and save the record to SQL Server. ***