Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty cells within cell range are not exported #1

Closed
tealeg opened this issue Jul 27, 2011 · 1 comment
Closed

Empty cells within cell range are not exported #1

tealeg opened this issue Jul 27, 2011 · 1 comment
Assignees
Milestone

Comments

@tealeg
Copy link
Owner

tealeg commented Jul 27, 2011

If you have an XLSX file that contains a row where not every column contains a value, then the blank fields are completely ommitted from the API. This is problematic because it makes it seem like all values are left packed. The most typical use case is actually that you want to export the structure with this fields intact (treating and Excel worksheet as a table).

Using the program xlsx2csv as an example we can see some input that should result in output like this:

A, B, C, D
1, , 3, 4

Actually appears as:

A, B, C, D
1,3,4

@ghost ghost assigned tealeg Jul 27, 2011
@tealeg
Copy link
Owner Author

tealeg commented Jul 27, 2011

This is caused by the XLSX format not outputting XML for these cells. We needed to read the range defined in the row (a string that looks like this "1:3", for example) and then check that each row contains the right cells. Where cells were missing we add them in as empty cells. I suspect there are still issues around this (particularly where the range doesn't start at 1), but for now I am happy to close this bug down.

@tealeg tealeg closed this as completed Jul 27, 2011
tealeg pushed a commit that referenced this issue Feb 3, 2015
Adding setColWidth Function
tealeg pushed a commit that referenced this issue Apr 1, 2016
Adding setColWidth Function
tealeg pushed a commit that referenced this issue Feb 17, 2017
* Func. appending an existing sheet to a file

In cases where Sheet(s) is created before File

* added AppendSheet tests

* Fix appending of instances instead of copies

* Fix appending of instances instead of copies
tealeg pushed a commit that referenced this issue Oct 24, 2017
ryho pushed a commit that referenced this issue Apr 1, 2019
sheet.row get row by index from sheet issue #388
tealeg pushed a commit that referenced this issue Jan 14, 2020
Adding setColWidth Function
tealeg pushed a commit that referenced this issue Jan 14, 2020
* Func. appending an existing sheet to a file

In cases where Sheet(s) is created before File

* added AppendSheet tests

* Fix appending of instances instead of copies

* Fix appending of instances instead of copies
tealeg pushed a commit that referenced this issue Jan 14, 2020
tealeg pushed a commit that referenced this issue Jan 14, 2020
sheet.row get row by index from sheet issue #388
tealeg pushed a commit that referenced this issue Jan 14, 2020
tealeg pushed a commit that referenced this issue Jan 14, 2020
sheet.row get row by index from sheet issue #388
tealeg pushed a commit that referenced this issue Jan 14, 2020
* Func. appending an existing sheet to a file

In cases where Sheet(s) is created before File

* added AppendSheet tests

* Fix appending of instances instead of copies

* Fix appending of instances instead of copies
tealeg pushed a commit that referenced this issue Jan 14, 2020
tealeg pushed a commit that referenced this issue Jan 14, 2020
sheet.row get row by index from sheet issue #388
derlinkshaender added a commit that referenced this issue Jul 29, 2020
dolmen referenced this issue in dolmen-go/tealeg-xlsx.fork May 11, 2023
wotmshuaisi pushed a commit to wotmshuaisi/xlsx that referenced this issue Nov 4, 2023
* Func. appending an existing sheet to a file

In cases where Sheet(s) is created before File

* added AppendSheet tests

* Fix appending of instances instead of copies

* Fix appending of instances instead of copies
wotmshuaisi pushed a commit to wotmshuaisi/xlsx that referenced this issue Nov 4, 2023
wotmshuaisi pushed a commit to wotmshuaisi/xlsx that referenced this issue Nov 4, 2023
sheet.row get row by index from sheet issue tealeg#388
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant