Hi,
I think that your code is not useful for me - it does not work as I am expecting - the memory usage constantly growing during file generation.
I will try to explain in more details my issue via code bellow:
var wb = new Workbook(FileFormatType.Excel97To2003);
for (var ind = 0; ind < 30; ind++)
{
wb.Worksheets.Add();
var sheet = wb.Worksheets[wb.Worksheets.Count - 1];
for (var i = 0; i < 65536; i++)
{
var cell1 = sheet.Cells[string.Format("A{0}", (i + 2))];
cell1.PutValue(i + 2);
var cell2 = sheet.Cells[string.Format("B{0}", (i + 2))];
cell2.PutValue(i + 4);
}
wb.FlushToDisk(); //no such method, here I want to save to disk and deallocate memory ()
}
wb.Save(@"d:\tmp2\_BigSizeSimple2.xls");
Is in Cells a method which is similar to FlushToDisk which allow to deallocate memory and write this chunk to disk - similarly like in StreamWriter.
When I run above code memory needed for producing this report is about 200 MB. I am concerned about generating on demand files in ASP.NET application.
Regards,
Tomasz Janicki