ADOtable Excel

From: Bob_M (Stardate10_at_hotmail.com)
Date: 06/29/04


Date: Tue, 29 Jun 2004 16:04:21 -0400

Hello All,

I would like to read the a few cells for data from an Excel file. I have
done this with ADO and Access but can't get it to work with Excel. Below is
my code. How would I get cell A1 from sheet1? Thanks Bob

 ADOTable := TADOTable.create(application);
  ADOTable.ConnectionString :=
    'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\test.xls;Extended
Properties=Excel 8.0';

  try
    (* Read Section title Data *)
    ADOTable.TableName := '[Sheet1]';
    ADOTable.active := True;
  finally
    ADOTable.Free;
  end;


Quantcast