I am using EPPlus in my .Net project to output some data to an Excel worksheet.
Suppose I wanted to format EG columns with a specific format. Using EPPlus, I know that I can do this as follows:
wks.Cells("E:G").Style.Numberformat.Format = ...
Now, I wonder, suppose I wanted to do the same thing, but referring to the columns by their index numbers and not by their alphabetical representation - in theory, something similar to this:
wks.Columns("5:7").Style.Numberformat.Format = ...
Now I know that this will work if I do something like this:
wks.Cells(1,5,wks.Dimension.End.Row,7).Style.Numberformat.Format = ...
But I hope that in EPPlus there will be a better / better way to do this. Any thoughts / suggestions?
Thanks!!
source share