Hi experts,
I am using Aspose.Cells Version 7.0.4.0 for .Net in one of my project.
When I am trying to read the large size excel files using Aspose.Cells.WorkBook, I am getting
Error: System.OutOfMemoryException
I am processing Excel Files (.xlsx) with size 38,000 KB and 52,000 KB i.e., around 100000 rows in excel.
string tempPath = strPath + @"" + fileType; //path from where I am reading the file (C drive)
foreach (string templateFile in Directory.GetFiles(tempPath))
{
using (FileStream fstream = new FileStream(templateFile, FileMode.Open))
{
Workbook workbook = new Workbook(fstream); //getting exception here
Worksheet worksheet = workbook.Worksheets[0];
ArrayList misMatchedColList = new ArrayList();
//other code
After reading the solutions on google, I tried to use code for ‘memory preferences’ :
// Specify the LoadOptions
LoadOptions opt = new LoadOptions();
// Set the memory preferences
opt.MemorySetting = MemorySetting.MemoryPreference; //not getting this option in my code.
I wonder ‘MemoryPreference’ is not available with this version of Aspose.Cells or available using other way round.
Kindly suggest some solution how to use ‘MemoryPreference’ with this version of Aspose.Cells so that I can process large size excel file without above error.