Peter Chan
asked on
Line meaning
Hi,
What is the meaning of this?
What is the meaning of this?
IEnumerable<DocumentFormat.OpenXml.Spreadsheet.Column> ic = cs.Elements<DocumentFormat.OpenXml.Spreadsheet.Column>().Where(r => r.Min == columnIndex).Where(r => r.Max == columnIndex);
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
First() returns what the name is suggesting: the first (and eventually the only) item from the collection.
this avoids to "loop" on the collection.
this avoids to "loop" on the collection.
ASKER
To the original line, why does it need to check both Min and Max in there?
I don't know. that is the application logic presumably
it surely tries to consider only cells that are not merged, and at exaclty that position
it surely tries to consider only cells that are not merged, and at exaclty that position
ASKER
Is such line only destined to check for non-merged cell? How to detect that relevant cell is a merged cell?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot Hengel. Where is the documentation located at?
sorry, I had not pasted the URL above:
https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column(v=office.14).aspx
you can find such information really quickly, using google, you search this:
DocumentFormat.OpenXml.Spr eadsheet.C olumn site:microsoft.com
https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column(v=office.14).aspx
you can find such information really quickly, using google, you search this:
DocumentFormat.OpenXml.Spr
ASKER
Is it returning one array per relevant spreadsheet columns, by such line?
What is the purpose to 'care' about only 'First()' below?
Open in new window