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
When I try to create a new column on table, the method CreateColumn return the following error:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.Generic.List`1.get_Item(Int32 index)
at NPOI.XSSF.UserModel.XSSFTable.CreateColumn(String columnName, Int32 columnIndex)
Codes
privatestaticvoidCreateCustomSheet(IWorkbookworkbook,List<MyCustomClass>values){// Create SheetXSSFSheetsheet=(XSSFSheet)workbook.CreateSheet("SheetName");
sheet.TabColor =new XSSFColor(SixLabors.ImageSharp.Color.Orange);// Create tableXSSFTabletable= sheet.CreateTable();
table.Name ="TableName";
table.CreateColumn("ColumnName1",0);// <-- Here
table.CreateColumn("ColumnName2",1);
table.CreateColumn("ColumnName3",2);
table.StyleName = XSSFBuiltinTableStyleEnum.TableStyleLight9.ToString();// Fill in the data// [...]}
The text was updated successfully, but these errors were encountered:
tonyqus
changed the title
CreateColumn return System.ArgumentOutOfRangeException: Index was out of range
XSSFTable.CreateColumn return System.ArgumentOutOfRangeException: Index was out of range
Aug 28, 2024
2.7.0
Issue Description
When I try to create a new column on table, the method
CreateColumn
return the following error:Codes
The text was updated successfully, but these errors were encountered: