performance - NPOI's RemoveRow is very slow -
i'm using npoi clear data of rows given row index way last row using following function:
public void deletetolastrow(isheet sheet, int firstrowindex) { int lastrowindex = sheet.lastrownum; (int rowindex = lastrowindex; rowindex >= firstrowindex; rowindex--) { var deletedrow = sheet.getrow(rowindex); // rows warrantied not null sheet.removerow(deletedrow); } }
however, have around 100 cells in each row, , around 80 cells out of 100 have complex formula. because of that, takes me 8 seconds delete 200 rows. there way increase performance in case?
most cells reference 3 or 4 other cells @ start of same row. reference 1 fixed cell @ start of sheet not delete.
i'm using .net 4.6.2, npoi 2.3.0, file xlsx i'm using xssf.
Comments
Post a Comment