Hi team,
I am using Aspose.Cells 18.2.0.0 to open a huge .xls file and see that memory is still so high although I called Workbook.Dispose. This is my steps to create sample huge .xls file:
My sample code i used to test:
static void Load_XLS(string input)
{
try
{
Aspose.Cells.LoadOptions opt = new Aspose.Cells.LoadOptions();
//Set the memory preferences
opt.MemorySetting = MemorySetting.MemoryPreference;
Workbook workbook = new Workbook(input, opt);
//Try to release resources by using Dispose
workbook.Dispose();
Console.WriteLine("Xls file is loaded successfully");
}
catch (Exception e)
{
Console.WriteLine("Failed to load xls file. " + e.Message);
}
}
static void Main(string[] args)
{
Aspose.Cells.License asposelicense = new Aspose.Cells.License();
asposelicense.SetLicense("Aspose.Total.lic");
Load_XLS(@"C:\test\500MB.xls");
System.Threading.Thread.Sleep(30000); // Sleep 30s to observe the memory
}
Run this code and observe the memory it uses, after message “Xls file is loaded successfully” is showed, the memory is still not released (more than 1,5GB).
Please help,
Thanks