I’d like to have some coulmns of an excel sheet in Julia in a Vector{Int64}
format. However, it gives me Matrix{Any}
.
My try:
xf = XLSX.readxlsx(`"C:/Data/sales.xlsx"`)
A = xf["sheet1!A2:A100"])
A_vec = vec(A)
This return Vector{Any}
. How to get Vector{Int64}
?
nilshg
2
But didn’t set infer_eltypes
neither to true
nor false
But didn’t set infer_eltypes
neither to true
nor false
If you did not set it then you read with the default value, which is false.
Maybe the old trick of using identity?
julia> a = Any[1, 2, 3, 4]
4-element Vector{Any}:
1
2
3
4
julia> identity.(a)
4-element Vector{Int64}:
1
2
3
4
But, why cannot you read again but setting the keyword argument?