jazzband / tablib

Python Module for Tabular Datasets in XLS, CSV, JSON, YAML, &c.
https://tablib.readthedocs.io/
MIT License
4.56k stars 588 forks source link

Allow importing 'ragged' .xlsx files through dataset #547

Closed clemencealainpadam closed 1 year ago

clemencealainpadam commented 1 year ago

Fixes #465.

This is an almost blind copy paste of the work done by @claudep in #466 to allow importing ragged file through dataset also. (https://github.com/jazzband/tablib/issues/465#issuecomment-1172260736)

claudep commented 1 year ago

Good catch! I wonder if it would be worth factorizing that sheet import loop between both methods so such mistakes are less probable in the future? What do you think?

codecov[bot] commented 1 year ago

Codecov Report

Merging #547 (1e37bce) into master (7f47b33) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #547   +/-   ##
=======================================
  Coverage   91.39%   91.40%           
=======================================
  Files          28       28           
  Lines        2720     2723    +3     
=======================================
+ Hits         2486     2489    +3     
  Misses        234      234           
Impacted Files Coverage Δ
src/tablib/formats/_xlsx.py 100.00% <100.00%> (ø)
tests/test_tablib.py 98.73% <100.00%> (+<0.01%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

clemencealainpadam commented 1 year ago

Agreed ! I propose a new function import_sheet 1e37bce

claudep commented 1 year ago

@hugovk I'm not sure that if I "Rebase and merge", the commit message change you suggested will be taken into account. May I let you do the merge?

hugovk commented 1 year ago

Done!