You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Grab the First Worksheet appear in Excel instead of name? #37
Is it possible to grab the first worksheet in the excel file irrespective of its name?
This will select sheet by name.
var excel = new ExcelQueryFactory("excelFileName");
var oldCompanies = from c in repo.Worksheet(1) //Queries the second worksheet in alphabetical order
where c.LaunchDate < new DateTime(1900, 1, 1)
select c;
A specific worksheet can be queried by its index in relation to the other
worksheets in the spreadsheet.
The worsheets index order is based on their names alphatically; not the
order they appear in Excel. For example, if a spreadsheet contains 2
worksheets: "ten" and "eleven". Although "eleven" is the second worksheet
in Excel, it is actually the first index.
var excel = new ExcelQueryFactory("excelFileName");
var oldCompanies = from c in repo.Worksheet(1) //Queries the
second worksheet in alphabetical order
where c.LaunchDate < new DateTime(1900, 1, 1)
select c;
Is it possible to grab the first worksheet in the excel file irrespective
of its name?
This will select sheet by name.
var excel = new ExcelQueryFactory("excelFileName");
var oldCompanies = from c in repo.Worksheet(1) //Queries the second
worksheet in alphabetical order
where c.LaunchDate < new DateTime(1900, 1, 1)
select c;
Reply to this email directly or view it on GitHubhttps://github.com//issues/37
.
you can try repo.Worksheet(0), but that might return the first
worksheet based on alphabetical order and not necessarily the order they
appear.
Unfortunately if it does sort it by alphabetical order, then you won't be
able to do what you want with LinqToExcel because it's a limitation of the
OLEDB engine that LinqToExcel uses.
Activity
paulyoder commentedon Feb 27, 2014
Query a specific worksheet by index
A specific worksheet can be queried by its index in relation to the other
worksheets in the spreadsheet.
The worsheets index order is based on their names alphatically; not the
order they appear in Excel. For example, if a spreadsheet contains 2
worksheets: "ten" and "eleven". Although "eleven" is the second worksheet
in Excel, it is actually the first index.
var excel = new ExcelQueryFactory("excelFileName");
var oldCompanies = from c in repo.Worksheet(1) //Queries the
second worksheet in alphabetical order
where c.LaunchDate < new DateTime(1900, 1, 1)
select c;
https://github.com/paulyoder/LinqToExcel#apply-transformations
On Thu, Feb 27, 2014 at 4:01 AM, ABC notifications@github.com wrote:
imran1231 commentedon Feb 28, 2014
I am talking about the order they appear in Excel
paulyoder commentedon Mar 1, 2014
you can try repo.Worksheet(0), but that might return the first
worksheet based on alphabetical order and not necessarily the order they
appear.
Unfortunately if it does sort it by alphabetical order, then you won't be
able to do what you want with LinqToExcel because it's a limitation of the
OLEDB engine that LinqToExcel uses.
On Fri, Feb 28, 2014 at 7:09 AM, ABC notifications@github.com wrote:
RyanDansie commentedon Jul 27, 2014
Related pull request: #51