BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OleError using excel

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Jorge Novoa
Guest





PostPosted: Wed Sep 06, 2006 8:12 am    Post subject: OleError using excel Reply with quote



The problem is the next:
I tried to retrieve data from a tquery to a excel sheet:
excelsheet.cells.item[i,j]:=query1.fieldbyname('fieldname').asstring
..
..
when that lines execute raise an Ole Error.

After a while tinking about it, i change the way to pass the data to excel. I first passed data from tquery to stringgrid and then from strnggrid to excel:
procedure tosgrid()
....
stringgrid1.cells[i,j]:=query1.fieldbyname('fielname1').asstring
...

procedure toexcel()
...
excelsheet.cells.item[i,j]:=stringgrid1.cells[j,i];
...

executing above procedures, no error where raised.
why that happens?, its some strings type incompatiblity there?.
The problem could be in the time procedures takes to executing when pass large data amounts.
hope understand
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.