Skip to content

Feature parity with XLSX.jl's FileIO extension - #69

Merged
davidanthoff merged 1 commit into
mainfrom
switchback-readiness
Sep 1, 2026
Merged

davidanthoff merged 1 commit into
mainfrom
switchback-readiness

Conversation

@davidanthoff

Copy link
Copy Markdown
Member

Prepares ExcelFiles for the request to restore its FileIO registration, by closing the feature gaps against XLSX.jl's FileIO extension so the switch is painless for users who rely on the current routing:

  • Zero-arg load: load("file.xlsx") loads the first sheet (was an error).
  • transpose=true keyword for load (fixes Transposing sheet before entering into DataFrame #12) — parity with the XLSX extension's flag; works for both xls and xlsx since the transpose happens on the materialized matrix.
  • Save upgrades: save accepts any Tables.jl source (not just iterable tables), writes multiple sheets via save(file, "name" => table, ...) (fixes write multiple sheets to the same file #38), overwrites existing files by default in line with CSV/JLD2/FileIO conventions (fixes Make it default to overwrite existing files instead of throwing an Error #24; overwrite=false restores the guard), and forwards keyword arguments (sheetname, anchor_cell, ...) to XLSX.writetable.
  • Tables.jl drop-in proof: new tests show the lazy ExcelFile return feeds Tables.columns and DataFrame directly (via Tables.jl's TableTraits fallback), so sink-position usage is unchanged relative to the eager XLSX.DataTable.
  • README: documents all of the above, fixes the colnames type documentation (Vector{Symbol}, fixes Documentation for colnames is wrong for load() #44), adds an open-once-read-many-sheets example via ExcelReaders.openxl (fixes Open .xlsx file once and read multiple sheets #34), and points to XLSX.readtable as the direct escape hatch for its exclusive options (native Excel table_name reads, stop_in_row_function, missing_strings, typed eager columns).

The remaining intentional differences vs the XLSX extension: the return value is a lazy descriptor rather than an eagerly parsed table (that is the point — it keeps backend-swapped/pushed-down reads possible), and the fine-grained readtable knobs stay with XLSX.readtable directly.

All test items green locally. Feature release → suggest v1.1.0 (NEWS included; version bump left to you).

🤖 Generated with Claude Code

- load("file.xlsx") without a sheet argument loads the first sheet.
- New transpose=true keyword for load (fixes #12), for sheets organized in
  rows rather than columns.
- save accepts any Tables.jl source in addition to iterable tables, can
  write multiple sheets via save(file, "name" => table, ...) (fixes #38),
  overwrites existing files by default in line with other FileIO formats
  (fixes #24; pass overwrite=false for the old error), and passes keyword
  arguments through to XLSX.writetable.
- Tests proving the lazy ExcelFile return works as a Tables.jl source
  (Tables.columns) and with DataFrame, so it is a drop-in for sinks.
- README: document the new features, fix the colnames type (Vector{Symbol},
  fixes #44), add an open-once-read-many example via ExcelReaders.openxl
  (fixes #34), and point to XLSX.readtable for its exclusive options.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@davidanthoff
davidanthoff merged commit 462223b into main Sep 1, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant