You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$10
For Premium members:
Well I think this will help you in your company if you have problems connecting excel 2007 files.
First of all we are declaring the ODBC namespace which we will use an Excel DNS;
using System.Data.Odbc;
then we will write these codes for connecting to a specific Excel file;
String strConn = @"Dsn=Excel Files;dbq=excel_file_path;defaultdir=excel_file_dir;driverid=1046;maxbuffersize=2048;pagetimeout=5"; OdbcConnection objConn = new OdbcConnection(strConn); objConn.Open(); OdbcDataAdapter adp = new OdbcDataAdapter("select * from [Sheet1$]", objConn); DataSet ds = new DataSet(); adp.Fill(ds); dataGridView1.DataSource = ds.Tables[0]; objConn.Close();
Thats all by using these codes you have got the datas you wanted to...
Cheers;)
Araf Global is a software consultancy company founded in 2016 focusing on cutting edge technologies.