Hello
I ran into an issue using the RemoveRow method.. it corrupts my xlsx files every time.
Can anyone confirm this behaviour?
Here's my code to delete a row:
```
public static void DeleteRow(ISheet sheet, int rowIndex)
{
int lastRowNum = sheet.LastRowNum;
if (rowIndex >= 0 && rowIndex < lastRowNum)
{
sheet.ShiftRows(rowIndex + 1, lastRowNum, -1);
}
if (rowIndex == lastRowNum)
{
var removingRow = sheet.GetRow(rowIndex);
if (removingRow != null)
{
sheet.RemoveRow(removingRow); // BUG: causes the xlsx to be currupt!
}
}
}
```
Thanks for any feedback
I ran into an issue using the RemoveRow method.. it corrupts my xlsx files every time.
Can anyone confirm this behaviour?
Here's my code to delete a row:
```
public static void DeleteRow(ISheet sheet, int rowIndex)
{
int lastRowNum = sheet.LastRowNum;
if (rowIndex >= 0 && rowIndex < lastRowNum)
{
sheet.ShiftRows(rowIndex + 1, lastRowNum, -1);
}
if (rowIndex == lastRowNum)
{
var removingRow = sheet.GetRow(rowIndex);
if (removingRow != null)
{
sheet.RemoveRow(removingRow); // BUG: causes the xlsx to be currupt!
}
}
}
```
Thanks for any feedback