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 

Opentext Problem in Delphi

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.databases
View previous topic :: View next topic  
Author Message
tinpoppy@yahoo.com
Guest





PostPosted: Fri Aug 19, 2005 4:56 pm    Post subject: Opentext Problem in Delphi Reply with quote



Hi,


I'm trying to open a csv file from within Excel. I'm using the
OpenText command from within my Delphi project to do it. I only want
to
format one of the fields in the file as text (Column 5). If I don't,
Excel tries to format it as a number.


Here's my code:
xl := CreateOLEObject('Excel.application');
xl.Visible := True;

xl.Workbooks.OpenText(sFileOut, Origin:=437, StartRow:=1,
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=True, Space:=False,
Other:=False, FieldInfo:=Array(Array(5, 2)));


This isn't working because I don't have the "Array" piece stated
correctly. Does anyone know how to state it correctly?


Thanks.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.databases 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.