How to write matrix data to Excel in separate worksheets?

@adikaagas, welcome to discourse. Recommend posting a MWE as per guidelines.

NB: edited code to cover one additional use case

using XLSX

data1 = [[1, 2, 3], [4, 5, 6]];
data2 = [[1, 1, 1], [2, 2, 2]];    
data3 = [[0, 1,-1], [-2,0, 2]];

# write data1 to SHEET_A and data2 to SHEET_B
XLSX.writetable("TEST123.xlsx", SHEET_A=(data1, [:col1,:col2]),
       SHEET_B=(data2, [:col1 :col2]), overwrite=true)

# write data3 into existing SHEET_A
XLSX.openxlsx("TEST123.xlsx", mode="rw") do xf
    sheet = xf[1]
    XLSX.writetable!(sheet, data3, [:col1,:col2], anchor_cell=XLSX.CellRef("B10"))
end

# write data3 to new SHEET_C
XLSX.openxlsx("TEST123.xlsx", mode="rw") do xf
    n = XLSX.sheetcount(xf)
    XLSX.addsheet!(xf, "SHEET_C")
    sheet = xf[n+1]
    XLSX.writetable!(sheet, data3, [:col1,:col2])
end