Вот оно:
using Pkg
Pkg.add("XLSX")
using XLSX
A = reshape(1:20,4,5)
B = reshape(51:100,10,5)
function fill_sheet(sheet, arr)
for ind in CartesianIndices(arr)
XLSX.setdata!(sheet, XLSX.CellRef(ind[1], ind[2]), arr[ind])
end
end
XLSX.openxlsx("sample2.xlsx", mode="w") do xf
s = XLSX.addsheet!(xf,"SheetName_A")
fill_sheet(s,A)
s = XLSX.addsheet!(xf,"SheetName_B")
fill_sheet(s,B)
end