XLSX.jl icon indicating copy to clipboard operation
XLSX.jl copied to clipboard

Recommended way to clear an area in an existing Excel sheet

Open Mastomaki opened this issue 2 years ago • 1 comments

What is the recommended way to clear an area in an existing Excel sheet?

Mastomaki avatar May 13 '22 06:05 Mastomaki

You could just write over the cells with empty strings.

XLSX.openxlsx("testfile.xlsx", mode="rw") do file
   sheet = file[1]
   for col in 3:4, row in 2:3
       sheet[row, col] = ""
   end
end

sheet[row, col] = missing also works.

nathanrboyer avatar Aug 10 '22 14:08 nathanrboyer