- OS = Windows 2000 Server SP4
- SQL = MS SQL 2000 Server SP4
- Language = T-SQL
I have an excel file stored in a data base table as an image data type. I would like to somehow read the data from the excel file and extract its data into a data base table using t-sql.
I've used sql statements such as the following but this requires the excel file to reside as a physical file on the sql servers file system.
Expand|Select|Wrap|Line Numbers
- insert into SpreadsheetDataDump
- (f1,f2,f3,f4,f5,f6)
- Select f1,f2,f3,f4,f5,f6
- FROM OPENDATASOURCE
- ('Microsoft.Jet.OLEDB.4.0','Data Source="D:\spreadsheets\test.xls";Extended Properties="Excel 8.0;IMEX=1;HDR=NO"')
- ...WorksheetName$
Can this be done? Or do I have to parse out the image data as an excel file somewhere on the sql servers file system?
Thanks for any help you can provide.
-Mike