954,153 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

reading excel in Delphi

I'd like to read/write xls files in Delphi. I think there's a way to do this using ADO. Can anyone provide an example or head me in the right direction. Thanks.

bob on whidbey
Light Poster
32 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

Please use the search button as this has already been answered many times.

LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
 

as far as I know, for you to be able to read an excel document using delphi, you must first change your document's data type from .Xls to .Csv and open ur document like a textfile.

Jonase
Newbie Poster
3 posts since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

Totally untrue. You can read and write to excel. As I said, search the forum, there are a number of ways and code and so on within this forum

LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
 

Thank you Jonase. The CSV file approach, which is nicely supported by TStrngList, is one way. I was unable to discover how to use the Delphi components TExcelApplicatioin, TExcelWorkBook, etc.

Using the non-visual components of TXLSWorkbook turned out to be very straight forward. NativeExcel by NikaSoft seems to be well written and, more importantly, well documented with good samples.

bob on whidbey
Light Poster
32 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

I guess you didnt look through the rest of the excel posts then

LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You