Aeonserv
     Links   


Handy Links
Home
C# and VB.NET Comparison
RGB TO HEX Conversion
Privacy Policy

     Topics   
Networking
Programming
Sharepoint (MOSS)
SSIS

     Tutorial   
Learn @ IT Jungles


     Excel 2007 Connection strings   
Connection strings Examples for Excel 2007

.NET Framework Data Provider for OLE DB

This is a .NET Class Library from Microsoft. The namespace for this provider is System.Data.OleDb.OleDbConnection.

Standard Security:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\data\yourExcel2007file.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";
   




ACE OLEDB 12.0

This is an OLE DB data provider from Microsoft. The usage for this provider is Provider=Microsoft.ACE.OLEDB.12.0.

Xlsx files:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\data\yourExcel2007file.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";
   
    Note: HDR=YES indicates that the first row containts column name.

Treating data as text:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\data\yourExcel2007file.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES;IMEX=1";

    All data in the file will be treated as text. When querying data into a result set if you want to include the header row use HDR=NO.
    Remember to user the option IMEX=1 to avoid the application from crashing.

Xlsb files

    Querying Excel file with macro enabled

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\data\myExcel2007file.xlsm;Extended Properties="Excel 12.0 Macro;HDR=YES";
   
    Note: The quota " in the connection string needs to be escaped using your language specific escape syntax.


     Great Sites   
Make Money Online
Heath and Wealth Articles
ITJungles
Acne Information Portal

   Reading