跳到主要内容

clear_range

  • 清除范围内的所有单元格

声明

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

参数

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

返回值

返回ExcelErrorCode

使用方式

// 清空在(1,1)到(3,4)矩形范围内单元格 清除所有单元格
excel_obj.clear_range(1, 1, 3, 4);
excel_obj.save();

返回文档