测试了一下,可以这样设置
- sheet.ColumnHeader.Rows[1].Border = new Border() {
- BorderStyle = BorderStyle.Solid,
- BorderColor = Color.Red,
- BorderSizeBottom = 2,
- BorderSizeLeft = 2,
- BorderSizeRight = 2,
- BorderSizeTop = 0
- };
- sheet.ColumnHeader.Rows[0].Border = new Border()
- {
- BorderStyle = BorderStyle.Solid,
- BorderColor = Color.Red,
- BorderSizeBottom = 0,
- BorderSizeLeft = 2,
- BorderSizeRight = 2,
- BorderSizeTop = 2
- };
复制代码 |