Using Excel (Xlsx) file as a database using VBA (ActiveX Data Objects - ADO)
In the past we have already seen how to Connect to an Excel file using ADO and query its contents. That was using Microsoft Excel 2003 or earlier. With Office 2007 the file formats haver changed to XLSX, which might create the following problems
to solve that use the following Connection string:
cN.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\comp\documents\visual studio 2010\Projects\ExcelWorkbookDocLevel\ExcelWorkbookDocLevel\ExcelWorkbook1.xlsx;Extended Properties=Excel 12.0;Persist Security Info=False"
Wednesday, August 04, 2010
Download Windows Live Toolbar and personalize your Web experience! Add custom buttons to get the information you care about most.
Worked perfectly! Thanks!
ReplyDeleteThis worked for the 2007 Excel xlsx format, but not the 2010 or higher format, do you know of a way to read from these higher versions of Excel?
ReplyDelete