This is a very fragile use of FileIO internals.
|
function __init__() |
|
# Since FileIO PR #439 (July 2026) the central FileIO registry routes |
|
# format"Excel" to XLSX.jl's own FileIO extension, and no longer covers |
|
# legacy xls files at all. Loading ExcelFiles puts its loader first |
|
# again, and registers a format for xls files. Users who don't load |
|
# ExcelFiles are unaffected. |
|
try |
|
loaders = get!(Vector{FileIO.ActionSource}, FileIO.sym2loader, :Excel) |
|
filter!(x -> x !== ExcelFiles, loaders) |
|
pushfirst!(loaders, ExcelFiles) |
|
savers = get!(Vector{FileIO.ActionSource}, FileIO.sym2saver, :Excel) |
|
filter!(x -> x !== ExcelFiles, savers) |
|
pushfirst!(savers, ExcelFiles) |
|
|
|
if !haskey(FileIO.sym2info, :ExcelLegacy) |
|
FileIO.add_format(FileIO.format"ExcelLegacy", (), [".xls"], |
|
[:ExcelFiles => Base.UUID("89b67f3b-d1aa-5f6f-9ca4-282e8d98620d"), FileIO.LOAD]) |
|
end |
|
catch err |
|
@warn "ExcelFiles could not register itself with FileIO. Loading Excel files via FileIO.load may not use ExcelFiles." exception = (err, catch_backtrace()) |
|
end |
|
return nothing |
|
end |
It will probably break in the future. Please make a PR to FileIO instead of doing this.
This is a very fragile use of FileIO internals.
ExcelFiles.jl/src/ExcelFiles.jl
Lines 10 to 32 in c31a08d
It will probably break in the future. Please make a PR to FileIO instead of doing this.