如何使用Julia中的Taro在Excel中读取变量选择

时间:2021-07-10 22:50:45

I want to read in a selection from a Excel file using Taro (in Julia). The way I do it now is:

我想使用Taro(在Julia中)从Excel文件中选择。我现在这样做的方式是:

roomfile=joinpath(..."rooms.xlsx")
  output=Taro.readxl(roomfile,"A2:F10";header=false)
  classrooms=convert(Array,output)

But this reads only the fixed selection from cell A2 up to F10. Is it possible to read such a file until the end (last not empty row and column)? If so, how? The data is always rectangular with no empty cells.

但是这只读取了从A2到F10的固定选择。是否可以读到这样的文件直到结尾(最后不是空行和列)?如果是这样,怎么样?数据始终为矩形,没有空单元格。

Thanks in advance,

提前致谢,

1 个解决方案

#1


0  

If you save the file in ods format, you can use OdsIO.jl, more specifically

如果以ods格式保存文件,则可以使用OdsIO.jl,更具体地说

ods_read(roomfile;sheetName="Sheet1",retType="Matrix")

(other possible return types are Dict or DataFrame)

(其他可能的返回类型是Dict或DataFrame)

#1


0  

If you save the file in ods format, you can use OdsIO.jl, more specifically

如果以ods格式保存文件,则可以使用OdsIO.jl,更具体地说

ods_read(roomfile;sheetName="Sheet1",retType="Matrix")

(other possible return types are Dict or DataFrame)

(其他可能的返回类型是Dict或DataFrame)