Error message: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
The Exception is thrown when the value of i is 9 in the code below.
[TestMethod]
public void InserWorksheetIssue()
{
using var pck = new ExcelPackage();
var worksheet = pck.Workbook.Worksheets.Add("Sheet1");
for (int i = 1; i < 10; i++)
{
worksheet.InsertColumn(i, 1);
}
}
Error message: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
The Exception is thrown when the value of
iis 9 in the code below.