跳到主要内容

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();

返回文档