using XLSX提示AssertionError: A1:A10 is not a valid CellRef.

在提问之前请确定你已经努力阅读了文档,并且尝试自己在互联网上搜索。

请尽可能提供你的demo代码或者GitHub的gist地址。

# code
using XLSX
a = rand(10)
XLSX.openxlsx("cishu[1].xlsx", mode="w") do xf
    sheet = xf[1]
    sheet["A1:A10"] = a
end

我试了下可以读,但不能写。

看文档和测试里,写都是一个个单元格写的。

julia> XLSX.openxlsx("tst.xlsx", mode="rw") do xf
           sheet = xf[1]
           println(sheet["A1:A10"])
       end
Any[1; 3; 5; 7; 9; 11; 13; 15; 17; 19]

julia> a = rand(10)
10-element Array{Float64,1}:
 0.6415864659540391
 0.11039915421818658
 0.6026101172181249
 0.6278528774725936
 0.5812240721770736
 0.3086297069599324
 0.3018102933998159
 0.27655056867617267
 0.864400024832326
 0.9082927159718741

julia> XLSX.openxlsx("tst.xlsx", mode="rw") do xf
           sheet = xf[1]
           sheet["A1:A10"] = a
       end
ERROR: AssertionError: A1:A10 is not a valid CellRef.
...

julia> XLSX.openxlsx("tst.xlsx", mode="rw") do xf
           sheet = xf[1]
           for i in 1:length(a)
               sheet["A$i"] = a[i]
           end
       end

julia> XLSX.openxlsx("tst.xlsx", mode="rw") do xf
           sheet = xf[1]
           println(sheet["A1:A10"])
       end
Any[0.6415864659540391; 0.11039915421818658; 0.6026101172181249; 0.6278528774725936; 0.5812240721770736; 0.3086297069599324; 0.3018102933998159; 0.27655056867617267; 0.864400024832326; 0.9082927159718741]