Repository navigation
XLSX.jl can't be used with bounds checking #479
Copy link
Copy link
Open
Description
Using XLSX.jl with bounds checking (such as when the package is a test dependency) throws an error. A workaround is to use --check-bounds=auto. I've reproduced the error with 12.0 and 13.1, but 11.11 seems to work with bounds checking.
To reproduce the error (I'm using Julia 1.11.2 on Debian):
julia --check-bounds=yes -e ' \
using Pkg; \
Pkg.activate(; temp = true); \
Pkg.add(name = "XLSX", version = "0.13.1"); \
using XLSX'
Stack trace:
ERROR: LoadError: TaskFailedException
Stacktrace:
[1] wait(t::Task)
@ Base ./task.jl:370
[2] load_files!(xf::XLSX.XLSXFile, zip_io::ZipArchives.ZipReader{XLSX.FileArray}; pass::Int64, target_file::Nothing, split_sheets::Bool)
@ XLSX ~/.julia/packages/XLSX/Rx4wp/src/read.jl:1251
[3] load_files!
@ ~/.julia/packages/XLSX/Rx4wp/src/read.jl:1146 [inlined]
[4] open_or_read_xlsx(source::String, _read::Bool, enable_cache::Bool, _write::Bool; target_sheet::Nothing, load_formulas::Bool, split_sheets::Bool)
@ XLSX ~/.julia/packages/XLSX/Rx4wp/src/read.jl:775
[5] open_or_read_xlsx
@ ~/.julia/packages/XLSX/Rx4wp/src/read.jl:727 [inlined]
[6] openxlsx(source::String; mode::String, enable_cache::Bool)
@ XLSX ~/.julia/packages/XLSX/Rx4wp/src/read.jl:626
[7] macro expansion
@ ~/.julia/packages/XLSX/Rx4wp/src/XLSX.jl:153 [inlined]
[8] macro expansion
@ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:78 [inlined]
[9] macro expansion
@ ~/.julia/packages/XLSX/Rx4wp/src/XLSX.jl:150 [inlined]
[10] macro expansion
@ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:140 [inlined]
[11] top-level scope
@ ~/.julia/packages/XLSX/Rx4wp/src/XLSX.jl:144
[12] include
@ ./Base.jl:557 [inlined]
[13] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base ./loading.jl:2881
[14] top-level scope
@ stdin:6
nested task error: TaskFailedException
Stacktrace:
[1] wait(t::Task)
@ Base ./task.jl:370
[2] foreach
@ ./abstractarray.jl:3187 [inlined]
[3] (::XLSX.var"#255#260"{Int64, XLSX.XLSXFile, Channel{XLSX.ReadFile}, XLSX.Workbook})()
@ XLSX ~/.julia/packages/XLSX/Rx4wp/src/read.jl:1236
nested task error: XLSXError: No `sheetData` node found in worksheet
Stacktrace:
[1] first_cache_fill!(ws::XLSX.Worksheet, lznode::XML.LazyNode{String})
@ XLSX ~/.julia/packages/XLSX/Rx4wp/src/stream.jl:400
[2] (::XLSX.var"#257#262"{String, XLSX.Worksheet})()
@ XLSX ~/.julia/packages/XLSX/Rx4wp/src/read.jl:1234
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
TimG1964 commentedon Oct 21, 2026
This issue only affects Julia 1.11.0–1.11.4. You are on 1.11.2, so upgrading to 1.11.5 or later should fix this for you now. The interim workaround, as you noted, would be
--check-bounds=auto(orPkg.test(; julia_args=["--check-bounds=auto"]).A workaround for the underlying issue is now provided by PR 172 on XML.jl, but merging of this was blocked by a newly identified bug in XLSX.jl under julia v1.11.2. This is resolved in v0.13.2. Once the PR on XML is merged and released, this issue should be fixed.