MS-Excel automation maximum rows?

  • Thread starter René van Kessel
  • Start date
R

René van Kessel

Hello,

I use Excel OLE automation (Delphi components) to expot data to MS-Excel.
When I do this on a Windows 98 pc the export stops between 500 and 1000
rows. On other platforms everything goes finy.

What am I doing wrong?
Is there a maximum number of rows in Windows 98?

Thanks.
René


ExcelApplication := TExcelApplication.Create(Application);
ExcelWorkbook := TExcelWorkbook.Create(Application);
ExcelWorksheet := TExcelWorksheet.Create(Application);

ExcelApplication.Connect;
ExcelApplication.Workbooks.Add(EmptyParam, 0);
ExcelWorkbook.ConnectTo(ExcelApplication.Workbooks[1]);
ExcelWorksheet.ConnectTo(ExcelWorkbook.Worksheets[1] as _worksheet);

Row := 0;
Query.First;

while not Query.EOF do
begin
Inc(Row);

ExcelWorksheet.Cells.Item[Row, 1] := QueryBOOKING.AsString;
ExcelWorksheet.Cells.Item[Row, 2] := QueryADDRESS_CLIENT.AsString;
Etc.... about 20 fields...

Query.Next;
end;

ExcelWorkbook.Save;
ExcelApplication.Visible[0] := True;

ExcelApplication.Disconnect;

ExcelWorksheet.Free;
ExcelWorkbook.Free;
ExcelApplication.Free
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top