Following line of code will delete table column but also corrupt workbook and table will lose formatting:
table.Column(3).Delete(XLShiftDeletedCells.ShiftCellsLeft);
Comments: Delete works as expected: 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("B").Delete( XLShiftDeletedCells.ShiftCellsLeft );
table.Column(3).Delete(XLShiftDeletedCells.ShiftCellsLeft);
Comments: Delete works as expected: 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("B").Delete( XLShiftDeletedCells.ShiftCellsLeft );