Following doesn't work:
table.Column("MyHeaderName").Delete(XLShiftDeletedCells.ShiftCellsLeft);
I get IndexOutOfRange exception.
Comments: Then the table doesn't have a column with that name: var wb = new XLWorkbook(); var ws = wb.AddWorksheet("Sheet1"); ws.Cell("A1").SetValue("A") .CellBelow().SetValue(1); ws.Cell("B1").SetValue("B") .CellBelow().SetValue(2); var table = ws.RangeUsed().CreateTable(); table.Column("A").Style.Border.OutsideBorder = XLBorderStyleValues.Thick;
table.Column("MyHeaderName").Delete(XLShiftDeletedCells.ShiftCellsLeft);
I get IndexOutOfRange exception.
Comments: Then the table doesn't have a column with that name: var wb = new XLWorkbook(); var ws = wb.AddWorksheet("Sheet1"); ws.Cell("A1").SetValue("A") .CellBelow().SetValue(1); ws.Cell("B1").SetValue("B") .CellBelow().SetValue(2); var table = ws.RangeUsed().CreateTable(); table.Column("A").Style.Border.OutsideBorder = XLBorderStyleValues.Thick;