Click here to Skip to main content
15,867,771 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have an excel sheet i want to read a cell from that sheet which has no heading just have the values using asp.net.
can somebody please tell me how to do it.
thanks in advance
Posted

1 solution

There are tons of examples in Net, and two differences only:
1) connection string
CSS
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Book1.xls;Extended Properties="Excel 8.0;HDR=NO;"

2) command text
CSS
SELECT * FROM [Sheet$A1]


How To Use ADO.NET to Retrieve and Modify Records in an Excel Workbook With Visual Basic .NET[^] - strongly recommended!
Accessing Microsoft Office Data from .NET Applications[^]
ADO Provider Properties and Settings[^]
Using ADO.NET to work with Excel files[^]
How to read from an Excel file using OLEDB [^]

More on: CP Knowledge Base[^]
 
Share this answer
 
v3
Comments
Espen Harlinn 5-Jan-14 11:25am    
5'ed!
Maciej Los 5-Jan-14 11:26am    
Thank you, Espen ;)
saifullahiit 5-Jan-14 11:27am    
i havent found any solution in the given link :( can you please simplify it or give me code here
Maciej Los 5-Jan-14 11:32am    
:laugh: Please, read my answer carefully and you'll find a solution (first 5 lines).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900