![]() |
sql
i hve a excel file that i want to import to my form to view and change.
can i import it into a database? |
Connect to it with the following ADO connection string:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1""" "HDR=Yes;" indicates that the first row contains columnnames, not data "IMEX=1;" tells the driver to always read "intermixed" data columns as text TIP! SQL syntax: "SELECT * FROM [sheet1$]" - i.e. worksheet name followed by a "$" and wrapped in "[" "]" brackets. It is nice if the data rectangle starts in the upper-left corner of the sheet. ~ Shaun |
All times are GMT -4. The time now is 11:31 AM. |
Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.