If it's simply a CSV file then why complicate things by involving Excel in the first place? CSV is, after all, a plain text file. (Rather than using comma-separated values I would recommend tab-separated values since many comma-based implementations don't handle embedded commas very well at all, especially with some international figures which often use a comma instead of a decimal point.)
To start with why not simply snapshot your database and write it out as a CSV file? Then, when you have this sussed, only write it if it differs from the current file. -Andreas -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED] Sent: Thursday, 26 September 2002 11:20 To: Multiple recipients of list delphi 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/