How to access an excel spreadsheet through Delphi 5
Posted on 2011-09-28
My problem seems to be simple. I need to open up an odbc driver linked to an excel spreadsheet in Delphi and then read some data from it. Seems simple, but I can't seem to find the best way.
First of all I set up a odbc datasource for the spreadsheet.
I then setup a tdatabase component and connected it without a hitch. I then drop a ttable on the form and reference the tdatabase but when I try to select the tablename the system crashes.
Using ADO I dropped a tadoconnection on the form, setup the connection string, tested the connection and set the connected to true, no problems. I then drop a tadotable and referrence the tadoconnection. There is nothing in the drop down for tablename and when I try to set active = true, it tells me the tablename is missing.