Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Closed Unassigned: Cannot access table columns by header names [9404]

$
0
0
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;

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>