read_all
- 读取指定文件或缓冲区中的指定表格
声明
mixed read_all(string path, buffer data = nil, int sheet = 0, bool is_to_str = false)
参数
参数名 | 描述 |
---|---|
path | excel文件的路径 |
data | 缓冲区数据, 默认nil |
sheet | sheet编号,默认0 |
is_to_str | 是否将读取的数据转换为string |
返回值
成功为excel中表格数组,失败为nil
使用方式
// 读取test.xlsx的sheet1中的全部单元数据,并将数据转换为string
array data_arr = excel.read_all("sample/test.xlsx", nil, 1 , true);