 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Excequiel A. M. Guest
|
Posted: Thu Oct 30, 2003 1:53 pm Post subject: With CreateOLEObject try export to excel, buy i depend on th |
|
|
Hello to all.
At the moment I have a problem with an export from the programming language
delphi 6 to MS. Excel. I am exporting a matrix of 40 columns by 1800 rows,
which does not manage to be exported, if I diminish the amount of rows or of
columns the export is made without problems. The other that it causes to me
well-taken care of is that when I export a a little high amount of rows (900
registries they)en the administrator of tasks (Ctrl+Alt+Supr) appears the
Excel task (by CreateOLEObject('Excel.Application') this complicated me if
I want to make another export since the memory is saturated. I know clearly
that it is a problem of Memory (at the moment I have 164 Mb in ram), but if
somebody knows some intrucciones to take part from the file to disc and soon
to continue with the export would thank for them enough.
Arch : Variant;
Arch:=CreateOLEObject('Excel.Application');
// try
Arch.WorkBooks.Add;
Arch.Workbooks[1].Sheets.Add;
Arch.Workbooks[1].WorkSheets[1].Name:='SAG';
ExportaGrid;
arch.ActiveWorkBook.SaveAs(Edt_NomArchivo.Text);
arch.quit;
Thank.
note: Excuse me if post in place incorrect.
E. Arostica. M.
|
|
| Back to top |
|
 |
Deborah Pate (TeamB) Guest
|
Posted: Thu Oct 30, 2003 2:09 pm Post subject: Re: With CreateOLEObject try export to excel, buy i depend o |
|
|
<
I am exporting a matrix of 40 columns by 1800 rows,
which does not manage to be exported
I think you are talking about the Excel resource leak that
causes problems in particular on Windows 9x systems. The
solution to this problem is to reduce the number of times
you call Excel, typically by using a variant array to write
data to many rows at once. If you posted some of your
ExportaGrid code to borland.public.delphi.oleautomation
(the proper group for this) we could perhaps help more.
--
Deborah Pate (TeamB) http://delphi-jedi.org
TeamB don't see posts sent via Google or ISPs
Use the real Borland server: newsgroups.borland.com
http://www.borland.com/newsgroups/genl_faqs.html
|
|
| Back to top |
|
 |
Excequiel A. M. Guest
|
Posted: Thu Oct 30, 2003 6:26 pm Post subject: Re: With CreateOLEObject try export to excel, buy i depend o |
|
|
Thank you every much and I am writing to the indicated group.
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Sat Nov 01, 2003 12:00 pm Post subject: Re: With CreateOLEObject try export to excel, buy i depend o |
|
|
You may use ADO to export data into Excel file - this will be much faster
and will not require Excel to be installed.
//------------------------------------------
Regards,
Viatcheslav V. Vassiliev
http://www.managed-vcl.com
http://www.oledbdirect.com
"Excequiel A. M." <earostica (AT) galeon (DOT) com> сообщил/сообщила в новостях
следующее: news:3fa11571$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Hello to all.
At the moment I have a problem with an export from the programming
language
delphi 6 to MS. Excel. I am exporting a matrix of 40 columns by 1800 rows,
which does not manage to be exported, if I diminish the amount of rows or
of
columns the export is made without problems. The other that it causes to
me
well-taken care of is that when I export a a little high amount of rows
(900
registries they)en the administrator of tasks (Ctrl+Alt+Supr) appears the
Excel task (by CreateOLEObject('Excel.Application') this complicated me
if
I want to make another export since the memory is saturated. I know
clearly
that it is a problem of Memory (at the moment I have 164 Mb in ram), but
if
somebody knows some intrucciones to take part from the file to disc and
soon
to continue with the export would thank for them enough.
Arch : Variant;
Arch:=CreateOLEObject('Excel.Application');
// try
Arch.WorkBooks.Add;
Arch.Workbooks[1].Sheets.Add;
Arch.Workbooks[1].WorkSheets[1].Name:='SAG';
ExportaGrid;
arch.ActiveWorkBook.SaveAs(Edt_NomArchivo.Text);
arch.quit;
Thank.
note: Excuse me if post in place incorrect.
E. Arostica. M.
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|