8000 Column Cells · ClosedXML/ClosedXML Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Column Cells

Francois Botha edited this page Feb 26, 2018 · 2 revisions

ColumnCells.jpg

var workbook = new XLWorkbook();
var ws = workbook.Worksheets.Add("Column Cells");

var columnFromWorksheet = ws.Column(1);
columnFromWorksheet.Cell(1).Style.Fill.BackgroundColor = XLColor.Red;
columnFromWorksheet.Cells("2").Style.Fill.BackgroundColor = XLColor.Blue;
columnFromWorksheet.Cells("3,5:6").Style.Fill.BackgroundColor = XLColor.Red;
columnFromWorksheet.Cells(8, 9).Style.Fill.BackgroundColor = XLColor.Blue;

var columnFromRange = ws.Range("B1:B9").FirstColumn();

columnFromRange.Cell(1).Style.Fill.BackgroundColor = XLColor.Red;
columnFromRange.Cells("2").Style.Fill.BackgroundColor = XLColor.Blue;
columnFromRange.Cells("3,5:6").Style.Fill.BackgroundColor = XLColor.Red;
columnFromRange.Cells(8, 9).Style.Fill.BackgroundColor = XLColor.Blue;

workbook.SaveAs("ColumnCells.xlsx");
57A7

FAQ

Examples

Real world scenarios

Time Savers

Performance and Memory

Misc

Inserting Data/Tables

Styles

Ranges

Rows

Columns

Page Setup (Print Options)

AutoFilters

Comments

Dev docs

Clone this wiki locally
0