gsyxy100 你好,
可以在加载 Excel 之后,遍历 Sheet 单元格进行设置 Border:
代码如下:
- Border border = new Border(BorderStyle.Solid, System.Drawing.Color.Red, 3);
- for (int i = 0; i < this.FpSpread1.Sheets[0].RowCount; i++)
- {
- for (int j = 0; j < this.FpSpread1.Sheets[0].ColumnCount; j++)
- {
- this.FpSpread1.Sheets[0].Cells[i, j].Border = border;
- }
- }
复制代码 |