Page 1 of 1

out of memory

Posted: Fri Aug 29, 2014 2:02 am
by taoxl
Hi
when i add huge rows to the excel, xls raise an exception: "out of memory"
here is my test code below:

Code: Select all

procedure TfrmMain.btnAdd1Click(Sender: TObject);
var
  i : Integer;
begin
   XLS.Version := xvExcel2007;
   try
     for i:=0 to 900000 do
     begin
        XLS[0].AsInteger[0,i] := i;
     end;
   except
      on e : Exception do
      begin
         ShowMessage(e.Message);
      end;
   end;
end;
when the "out of memory" happened the test application only used 50M memory and my physical memory is almost 8G. i comfirm that i have enough memory to write 1000000 rows. the problem is not my physical memory. please try my test code

Re: out of memory

Posted: Wed Sep 03, 2014 7:01 am
by larsa
Hello

If you are using a delphi version that not has FastMM installed (like D7), you must install it.
You can download it here: http://sourceforge.net/projects/fastmm/