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
Our project is upgraded from 4.0.5 to 4.1.0 and noticed this error
The following code results in exception "row cannot be less than 1"
int xlRow = 18;
using (ExcelPackage xl = new ExcelPackage(pfReport, template))
{
var wb = xl.Workbook;
ExcelWorksheet sht = wb.Worksheets[1];
--> sht.InsertRow(xlRow, 1);
xl.Save();
}
Note that the template file contains text in cells below row 18
When rolling back to version 4.0.5 the code runs normally
Comments: In our case in turned out that it was an invalid NamedRange in the Excel template. You can check this by hitting CTRL+F3 in Excel. Search for #REF! in Value column. After deleting this NamedRange the problem was solved. Error message is misleading because it suggests your parameters are invalid.
The text was updated successfully, but these errors were encountered:
Our project is upgraded from 4.0.5 to 4.1.0 and noticed this error
The following code results in exception "row cannot be less than 1"
int xlRow = 18;
using (ExcelPackage xl = new ExcelPackage(pfReport, template))
{
var wb = xl.Workbook;
ExcelWorksheet sht = wb.Worksheets[1];
--> sht.InsertRow(xlRow, 1);
xl.Save();
}
Note that the template file contains text in cells below row 18
When rolling back to version 4.0.5 the code runs normally
Comments: In our case in turned out that it was an invalid NamedRange in the Excel template. You can check this by hitting CTRL+F3 in Excel. Search for #REF! in Value column. After deleting this NamedRange the problem was solved. Error message is misleading because it suggests your parameters are invalid.
The text was updated successfully, but these errors were encountered: