If you dont want to automate Excel you could ...

Use three TStirngLists.  Load the file into one (LoadFromFile) and loop
through it.  For each line in the first string list load it into the second
using  SL2.CommaText := SL1[Count].Text.  SL2 now contains one item for each
column in the spread sheet.

Load the third String list with data as you loop through and output from
that at the end (SaveToFile).
Quick and easy:)

Rob

Software engineer
Wild Software Ltd
Ph 03 338-1407
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Thursday, September 26, 2002 11:19 AM
Subject: [DUG]: Working with Excell spreadsheets


> Hi,
>
> I want to read in a spreadsheet (could be just a csv), check certain
columns
> versus what's on a database, and add an additional column or 2 to the
> spreadsheet if I find a discrepancy (in the spreadsheet vs the database)
and
> then write back out the updated csv.
>
> I haven't been developing in Delphi long and this is the first time I've
> wanted to read a text file. Looking at help, I'm thinking TstringStream
> would probably be a start. Unless someone can suggest something more
elegant
> or better fitted to the task?
>
> Thanks for any ideas.
>
> Dave
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to