One can insert a 2 dimensional data matrix MA via,
XLSX.openxlsx("my_Test.xlsx", mode="rw") do xf
sheet = xf[1]
sheet["C7"] = MA
end
but if I want to add this matrix in column 100 row 7 then I did not find out how a easy way to do it.
One can access the content of column 100 row 7 via sheet[100,7].
But for sheet[100,7] = MA no method is defined.
For inserting the matrix one needs a cell reference in the style sheet["CO7"].
How can I find out what the cell reference for sheet[100,7] is?
How to get in XLSX.jl a XLSX.CellRef from column and row number
Thank you for your reply(@ felipenoris). Sorry for the late reply I was out of office:
I was asking for a way to insert a Matrix at a certain position:
A=[1 2; 3 4]
XLSX.openxlsx("my_Try.xlsx", mode="w") do xf
sheet = xf[1]
sheet[10,2]= A
end
ERROR: MethodError: no method matching setdata!(::XLSX.Worksheet, ::Int64, ::Int64, ::Array{Int64,2})
does not work. I am using XLSX v0.7.3 and Julia 1.5
sheet[“B10”]=A
would work.
But if I want to add a matrix or vector programmatically in some far away column this does not help.
Thanks to @AndiMD
sheet[XLSX.CellRef(10,2)]=A
works.