This project has moved. For the latest updates, please go here.

Is there anyway to get worksheet name by index instead of alphabate?

Nov 18, 2013 at 9:11 AM
Hi,

GetWorksheetNames() method of ExcelQueryFactory returns worksheet names by alphabate.

Is there anyway to get the worksheet name by index in case of multiple worksheets (so that I can get the first worksheet of excel)

Thanks & Regards,
Vishal
Nov 18, 2013 at 3:05 PM
Edited Nov 18, 2013 at 3:11 PM
ExcelQueryFactory is part of LinqToExcel.
If you are using LinqToExcel you should ask your question over there.

This package ClosedXML is a totally different package

Here is how you would do it in ClosedXML.
                // Open the Excel file and get first worksheet
                XLWorkbook wb = new XLWorkbook(fileLocation);
                IXLWorksheet ws = wb.Worksheet(1);
Nov 19, 2013 at 8:48 AM
Thanks for pointing, it's my bad.

I will move the question to right discussion forum.