Microsoft Jet OLEDB 4.0 for MS-EXCEL

In This Article i will Explain How to use Jet OLEDB 4.0 in Excel
  • 2820

Introduction

This article describes how to use Jet OLE DB Provider 4.0 to connect to various external databases through installable ISAM drivers. Connection strings are provided for opening each ISAM database.

Coding
 

Open Excel

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
           "Data Source=c:\somepath\ExcelFile.xls;" & _
           "Extended Properties=""Excel 8.0;HDR=Yes;"";"

Open dBASE

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
          "Data Source=c:\somepath;" & _
          "Extended Properties=DBASE III;"

Open Lotus 1-2-3

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
           "Data Source=c:\somepath\Lotus123File.wk3;" & _
           "Extended Properties=Lotus WK3;" 

Open Paradox

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
           "Data Source=c:\somepath;" & _
           "Extended Properties=Paradox 5.x;" 

Open Text

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ 
       "Data Source=c:\somepath;" & _ 
       "Extended Properties=""text;HDR=Yes;FMT=Delimited;"";"

NOTE: The code in this article assumes that you have created an ADO Connection object: cnn, and an ADO RecordSet object: rst.

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2013 dotNetheaven. All rights reserved.