Reading data from Excel
Posted: Wed Oct 01, 2008 9:38 am
Hi,
I have an Excel spreadsheet with one column of data, each cell in this column containing a string of text. I would like to open this spreadsheet as a data source, and read each cell in the single column as a record.
I have tried creating both OleDB and ODBC connections, as follows:
OleDB: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Reports\Terms.xls;Extended Properties="Excel 8.0;HDR=No;IMEX=1";
ODBC: Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=C:\Reports\Terms.xls;DefaultDir=C:\Reports;
... but neither method returns any data when I attach a data source to it (using the SQL string "SELECT * FROM [Sheet1$]").
Attempting to display the data in a data band results in a blank page, and "View Data" returns no results.
Any help in this would be greatly appreciated.
Many thanks,
Colin
I have an Excel spreadsheet with one column of data, each cell in this column containing a string of text. I would like to open this spreadsheet as a data source, and read each cell in the single column as a record.
I have tried creating both OleDB and ODBC connections, as follows:
OleDB: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Reports\Terms.xls;Extended Properties="Excel 8.0;HDR=No;IMEX=1";
ODBC: Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=C:\Reports\Terms.xls;DefaultDir=C:\Reports;
... but neither method returns any data when I attach a data source to it (using the SQL string "SELECT * FROM [Sheet1$]").
Attempting to display the data in a data band results in a blank page, and "View Data" returns no results.
Any help in this would be greatly appreciated.
Many thanks,
Colin