Board index » delphi » Working with excel-sheets

Working with excel-sheets

How is it possible to access to an Excel-sheet with a TTable-component? I
tried to insert the path to an existing xls-file, but failed to get a
connect...
 

Re:Working with excel-sheets


The only way to access an Excel file with the BDE and a TTAble component is
to use the Excel ODBC driver. The following may help.

Create an ODBC DSN that points to the Excel file.

Excel files will not appear in the TTable.TableName property drop-down.
Enter the worksheet file name with no extension followed by a $ in the
TableName property. You can optionally append a cell range. For exmaple:
projects$A2:J1000

To read all of the rows in the worksheet when specifying a cell range make
the ending row number larger than the last possible row.

If you really want to work with a table name then you can define a

named region in Excel, then that region will appear in the list of tables

--
Bill
(TeamB cannot answer questions received via email)

Other Threads