sarsnake
sarsnake

Reputation: 27703

Epplus cell range numerically

In EPPlus extension, if I need to set style for a range of cells such as A1 to C1, I will use the following

ws.Cells["A1:C1"].Style.Font.Bold = true;

What is the equivalent for this using numbers only?

Upvotes: 10

Views: 19628

Answers (1)

Ernie S
Ernie S

Reputation: 14250

Cells has an overload that will let you do [FromRow, FromCol, ToRow, ToCol] like this:

ws.Cells[1, 1, 1, 3].Style.Font.Bold = true;

Upvotes: 27

Related Questions