Visual C# General
In C# .net 2.0, you can get a reference of sheets of a excel file. Here is a small code snippet,
Add reference of Microsoft.office.Interop.excel
Excel.
Application ExcelObj = new Excel.Application();Excel.
Workbook theWorkbook = null;string strPath="MENTION PATH OF EXCEL FILE HERE";
theWorkbook = ExcelObj.Workbooks.Open(strPath, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing);
Excel.
Sheets sheets = theWorkbook.Worksheets;Excel.
Worksheet worksheet = (Excel.Worksheet)sheets.get_Item(1);//Get the reference of second worksheetstring strWorksheetName = worksheet.Name;//Get the name of worksheet.
Sonik