Posted 9 May 2021, 4:48 pm EST
Hi …
i have a background worker for loading and modify some excel sheets, after some hours memory usage is very very high …
Using 12.45.20181.0.
Any ideas or is there anything missing ? Even when i only load and save the excel sheet there is memory usage is the same - nothing to do with Search&Replace i think
reduced code for test:
FarPoint.Win.Spread.FpSpread _Spreadsheet;
string _File;
_Spreadsheet = new FarPoint.Win.Spread.FpSpread();
while (true)
{
_File = "d:\\test.xls";
_Spreadsheet.OpenExcel(_File);
_Spreadsheet.Sheets[0].Cells[1, 1].Value = "ABC";
int x = 0;
int y = 0;
FarPoint.Win.Spread.SearchFoundFlags sff;
sff = _Spreadsheet.Search(0, "1", false, false, false, false, true, false, false, false, 0, 0, 499, 499, ref x, ref y);
if (x != -1 || y != -1)
{
_Spreadsheet.ActiveSheet.SetValue(x, y, "Replaced Text");
}
_File = "d:\\test1.xls";
_Spreadsheet.SaveExcel(_File);
}