how can read .xls file in wndow application using C#?

Posted by Sagarp under C# on 2/3/2010 | Views : 5127 | Status : [Member] | Replies : 4
Hi


i have create window application.plz tell me how can read value from .xls file in window application



thanks
sagar

Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/



Responses

Posted by: Abhi2434 on: 2/3/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
Here you go :

http://www.codeproject.com/KB/miscctrl/Excel_data_access.aspx

I wrote this to do exactly the same thing.

:)

www.abhisheksur.com

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: RtpHarry on: 2/3/2010 [Member] [MVP] Bronze

Up
0
Down
There is also this library (free)

http://www.carlosag.net/Tools/ExcelXmlWriter/

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bubbly on: 2/4/2010 [Member] Bronze

Up
0
Down
Hello,

You can check this link

http://www.gidforums.com/t-17370.html

++
Thanks & Regards,
Deepika

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Neeks on: 2/4/2010 [Member] Bronze

Up
0
Down
You can read the Excel file same as the MS Access.

You have to provide the connection string as:

2003 or earlier:
OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";
Ref.: http://www.connectionstrings.com/excel

2007:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES;IMEX=1";
Ref.: http://www.connectionstrings.com/excel-2007


Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response