Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Epplus cell range numerically

Tags:

c#

excel

epplus

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?

like image 599
sarsnake Avatar asked Jan 11 '16 22:01

sarsnake


1 Answers

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;
like image 161
Ernie S Avatar answered Oct 21 '22 14:10

Ernie S