Connection To MS Excel 2007

Stimulsoft Reports.NET discussion
Post Reply
Hamdy
Posts: 4
Joined: Sun Sep 09, 2007 12:14 pm
Location: Egypt

Connection To MS Excel 2007

Post by Hamdy »

Dear All

Can i connect to Microsoft Excel and if that , which provider can i use.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Connection To MS Excel 2007

Post by Brendan »

You should be able to use the OLEDB Data Provider.

For appropriate connection strings you can use www.connectionstrings.com

Excel 2007

Code: Select all

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

Excel

Code: Select all

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";

You can then add a datasourcre from an OleDb Connection using a select statement like the following:

Code: Select all

SELECT * FROM [sheet1$]
Post Reply