跳到主要内容

set_background_one_by_one

  • 逐个设置范围内单元格,返回结果数组

声明

array set_background_one_by_one(array colors, int top, int left, int bottom, int right)

参数

参数名描述
colors颜色二维数组
top范围最顶行
left范围最左列
bottom范围最底行
right范围最右列

返回值

返回ExcelErrorCode“二维数组”

使用方式

// 逐个设置从单元格(2, 2)到(2,4)处的单元格背景颜色为黄色,黑色,蓝色
excel_obj.set_background_one_by_one(["yellow", "black", "blue"], 2, 2, 2, 4);
excel_obj.save();

返回文档