set_background_dup
- 批量设置范围内单元格背景色
声明
enum ExcelErrorCode set_background_dup(mixed color, int top, int left, int bottom, int right)
参数
参数名 | 描述 |
---|---|
color | 颜色 |
top | 范围最顶行 |
left | 范围最左列 |
bottom | 范围最底行 |
right | 范围最右列 |
返回值
返回ExcelErrorCode
使用方式
// 批量设置从单元格(1, 2)到(1,4)处的单元格背景颜色为黄色
excel_obj.set_background_dup("yellow", 1, 2, 1, 4);
excel_obj.save();