Delphi: Deleting records in a MS Excel Spread-Sheet file
Posted by Robert Bebson on November 22, 2003 at 16:50:40:
I have a .TXT file filled with a list.
I need to search the Spread-Sheet for field matches from the .TXT list. If any fields match, then delete the whole corresponding record.
E.G: Line 1 in the .TXT = "abc". This string needs to be searched throughout the spreadsheet file. If found -E.G it is located (as an exact match) in the field colum 1 row 50. This whole row (record) needs to be deleted.
If there is no match in the spreadsheet for Line 1 of the .TXT ("abc") then move to check Line 2 of the .TXT and delete all matching records etc until you've been through the whole .TXT list.
They need to be exact field matches, EG: If a field contained "abc1234" - that record should stay put. It would be only "abc" records that should be deleted.
Thanks for your time.
[ DelphiLand: free Delphi source code, tips, tutorials ]