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 

Excel automation- strings of 4000 characteres cut down to 18

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





PostPosted: Thu Jun 26, 2003 9:49 am    Post subject: Excel automation- strings of 4000 characteres cut down to 18 Reply with quote



Hello,

Please, someone can help me with this ?
When I try to write in excel, the long strings are cutted down to 1800.

My code is:
FExcelWorksheet : TExcelWorksheet;
Matrix : Variant;

Matrix :=VararrayCreate(VarArrayCreate([0 , 10], varVariant)
Matrix[0] := mystring;
...
Matrix[10] := another string;
FExcelWorksheet.Range[scolbegin, scolend].Value := Matrix;

if I try
Matrix :=VararrayCreate(VarArrayCreate([0 , 10], varoleStr) i get an error
"The server threw an exception"
also, if I try FExcelWorksheet.Range[scolbegin, scolend].Value :=
VarAsType(Matrix, varOleStr);

I don't know what to do. Please help me.

Thank you very much.

Best regards,
Laura



Back to top
Laura Dragulin
Guest





PostPosted: Thu Jun 26, 2003 2:19 pm    Post subject: Re: Excel automation- strings of 4000 characteres cut down t Reply with quote



it's ok now.
if i write cell by cell

FExcelWorksheet.Cells.Item[rowindex, colindex].Value := Matrix[colindex];
it works fine.

Thanks to Deborah Pate for her page.


"Laura Dragulin" <ldragulin (AT) zappmobile (DOT) ro> wrote

Quote:
Hello,

Please, someone can help me with this ?
When I try to write in excel, the long strings are cutted down to 1800.

My code is:
FExcelWorksheet : TExcelWorksheet;
Matrix : Variant;

Matrix :=VararrayCreate(VarArrayCreate([0 , 10], varVariant)
Matrix[0] := mystring;
..
Matrix[10] := another string;
FExcelWorksheet.Range[scolbegin, scolend].Value := Matrix;

if I try
Matrix :=VararrayCreate(VarArrayCreate([0 , 10], varoleStr) i get an error
"The server threw an exception"
also, if I try FExcelWorksheet.Range[scolbegin, scolend].Value :=
VarAsType(Matrix, varOleStr);

I don't know what to do. Please help me.

Thank you very much.

Best regards,
Laura






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.