Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 More openrowset fun!!

Author  Topic 

chenthorn
Starting Member

6 Posts

Posted - 2006-03-28 : 11:20:30
I am trying to extract data from an Excel spreadsheet via T-Sql, and I cant seem to extract a certain column because the header column is merged across the column I want and another one. Row A has "Recording Date (YYYYMM) merged across columns D (From) and E (To). I am only interested in the TO column. How can I extract only that column?
Here is the code I am using:
SELECT [Recording Date (YYYYMM)]
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="D:\Common\XMLDirect Data Currency Coverage Report_2-2-06.xls";
Extended properties=Excel 8.0')...['Real Prop Deeds_Report$']

I only get the from column in this query. Is there a way to call the E column directly?
thanks!
   

- Advertisement -