跳到主要内容

merge

  • 合并范围内的所有单元格

声明

enum ExcelErrorCode merge(int top, int left, int bottom, int right)

参数

参数名描述
top范围顶部行号
left范围最左列号
bottom范围底部行号
right范围最右列号

返回值

返回ExcelErrorCode

使用方式

// 合并(3,1)到(6,2)范围内矩形单元格
// 对于xls文件似乎不起效果
mixed excel_error_code = excel_obj.merge(3, 1, 6, 2);
excel_obj.save();

返回文档