以数字方式提供细胞范围

sar*_*ake 8 c# excel epplus

在EPPlus扩展中,如果我需要为一系列单元格设置样式,例如A1到C1,我将使用以下内容

ws.Cells["A1:C1"].Style.Font.Bold = true;
Run Code Online (Sandbox Code Playgroud)

仅使用数字的等价物是什么?

Ern*_*e S 20

Cells有一个过载,让你这样做[FromRow, FromCol, ToRow, ToCol]:

ws.Cells[1, 1, 1, 3].Style.Font.Bold = true;
Run Code Online (Sandbox Code Playgroud)