paulyoder/LinqToExcel — pull request #51 by RyanDansie (2014-07-27 13:35:18+00:00)
Title: Add method to get worksheet names in the same order they appear in excel (for review/comments only)

This provides a method GetWorksheetNamesOrdered() to return the worksheet names in the same order as they would appear in excel.

Works by extracting the contents of the excel file, finding the XML file containing the worksheet names and parsing the XML contents of that file. I found the necessary information about the xlsx file format from this stack overflow answer:
http://stackoverflow.com/a/19930386/2617732

Using the test excel files, the new method works fine with the xlsm and xlsx files. It also works with csv by returning an empty list. It doesn't work for the xls and xlsb files as they have a different format. If anybody knows where the same worksheet information could be found within an xls file, please comment on here.

Notes:
1. Requires the project to use v4.5 .net framework
2. Requires a reference to System.IO.Compression
3. This doesn't have any dependencies within this project so even if its unsuitable for merging, its still potentially useful as a standalone function i.e. to offer a workaround to people that need the ordering of worksheets.