![]() |
Excel schema using Jet OLEDB Provider?
Is there a way to query the Jet OLEDB Provider for Excel
to find out the COlumn Names and DataTypes of an Excel worksheet? I want to import an Excel file into SQL Server and need to create the table on the fly for that file and set the column datatypes for that table. What would be the best way to accomplish this? Thanks! |
Excel schema using Jet OLEDB Provider?
Do you mean a temporary table or one that will persist? I think you
can only create a temporary SQL Server table from Excel. A temp table will only persist as long as the connection that created it remains open i.e. it is automatically deleted as soon as it is detected as being no longer used. This is for security reasons. You will have to create a permanent table from within SQL Server so you may as well do the data import from there. Creating permanent tables on the fly is not really how a RDBMS should be used, IMHO. -- "mike" wrote in message ... Is there a way to query the Jet OLEDB Provider for Excel to find out the COlumn Names and DataTypes of an Excel worksheet? I want to import an Excel file into SQL Server and need to create the table on the fly for that file and set the column datatypes for that table. What would be the best way to accomplish this? Thanks! |
All times are GMT +1. The time now is 10:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com