How to find the first sheetname of an excel file exceldata.xls

Posted by Preejo under ASP.NET on 11/22/2011 | Points: 10 | Views : 2329 | Status : [Member] | Replies : 1
Hi Friends,

I am using VS 2005,C#,ASP.NET. and .net framework 2.
I have an excel file exceldata.xls , a excel 2003 file.
How to get the first sheet-name of exceldata.xls file?

Thanks in advance,
Preejo




Responses

Posted by: RohiK on: 11/22/2011 [Member] Starter | Points: 25

Up
0
Down
Hi ,

you can select sheet number in select statement

string strSQL = "SELECT * FROM [Sheet$]";


Happy Programming!!
Rohi

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

Login to post response