Trying to enumerate of the cells in a row, and the Origin sheet has many tables in it, Separated by blank columns, and some of the Cells internally to the table representation are also blank.
This means that the performance of getting the actual cell it diminished because:
- it has to be done via a column name (Many letters)
- also to catch exceptions when the cell does not exist
- internal each search for column it iterating over more and more of the list as it "Hunts" for the column name via a string match (Very inefficient!)
I use the following (Via other libraries) to get the cells in a table:
Cell[] cells = row.Skip(startColumnOffset).Take(columnCount).ToArray();
Trying to enumerate of the cells in a row, and the Origin sheet has many tables in it, Separated by blank columns, and some of the Cells internally to the table representation are also blank.
This means that the performance of getting the actual cell it diminished because:
I use the following (Via other libraries) to get the cells in a table:
Cell[] cells = row.Skip(startColumnOffset).Take(columnCount).ToArray();