When opening a file with
XLSX.openxlsx(results_path, mode="rw") do xf
sheet = xf[sheet_name]
# more reading functions
end
I get
ERROR: AssertionError: Some internal files were not loaded into memory. Did you use `XLSX.open_xlsx_template` to open this file?
Stacktrace:
[1] writexlsx(output_filepath::String, xf::XLSX.XLSXFile; overwrite::Bool)
@ XLSX C:\Users\Will Laptop\.julia\packages\XLSX\FFzH0\src\write.jl:64
...
Where the call is occurring during writexlsx(filepath, xf, overwrite=true)
Originally thought to be a ram issue, I have this calling on hundreds of other excel sheets (some larger, some smaller) with no real telltale sign as to why one would give this error. What's going on here and how can I narrow down why this would happen in a particular file? Alternatively, what's another design pattern I can apply to large files I need to open and edit? I've tried enable_cache=false, but on rw it appears to be a requirement to also have it enabled. (https://github.com/felipenoris/XLSX.jl/blob/a9738321c945ad4f1a44c1c6406b260f04d411bb/src/read.jl#L184-187)