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 }}
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.
Hello there,
i recently started working with NPOI and just did some experiments to get to know the Framework.
So i created a very simple xlsx file and looked how to get acces to the data.
Here is my code:
varsheet= WB.GetSheetAt(0);intcheck= sheet.LastRowNum;varr= sheet.GetRow(3);varsb=new StringBuilder();varcell= r.GetCell(4);
sb.AppendLine(string.Format("row from {0} to {1}", sheet.FirstRowNum, sheet.LastRowNum));
sb.AppendLine(string.Format("Col from {0} to {1}", r.FirstCellNum, r.LastCellNum));
So nothing difficult.
with the following example file i expected
row from 0 to 5
col from 0 to 4 HelloWorld.xlsx
But actually LastCellNum says 5.
And when i looked into r.Cells (the array has the 4 expected cells) and jumped to the last cell it says ColumnIndex = 4.
At first i thought there is just an empty Cell in the next column but after i deleted the complete coloumn with ctrl+- the result was the same. And the number changed aswell as i added the last column with the random character.
The text was updated successfully, but these errors were encountered:
Aha, i'm also curious about this question. The 'CellNum' starts from 0 and ends with the actual max number plus 1.
In my opinion it's a mistake which cannot be corrected because a lot of people realize and obey it. If it changes, it may cause a large disaster for the projects using it. The developers cannot inform total users of the changes which aren't compatible to old versions.
Hello there,
i recently started working with NPOI and just did some experiments to get to know the Framework.
So i created a very simple xlsx file and looked how to get acces to the data.
Here is my code:
So nothing difficult.
with the following example file i expected
row from 0 to 5
col from 0 to 4
HelloWorld.xlsx
But actually LastCellNum says 5.
And when i looked into r.Cells (the array has the 4 expected cells) and jumped to the last cell it says ColumnIndex = 4.
At first i thought there is just an empty Cell in the next column but after i deleted the complete coloumn with ctrl+- the result was the same. And the number changed aswell as i added the last column with the random character.
The text was updated successfully, but these errors were encountered: