-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Ghost rows and columns when using decorations (colors/borders) #24
Comments
Interesting! Do you have the test fixtures already? They can be used to “train” my unit tests. |
Hi, by 'test fixtures', do you mean a file that cause the issue? |
please help provide me a sample file to reproduce the bug? |
Here is the first case (color removed from line 3) |
And this the case where I selected whole columns A and B, removed the color to the columns and add it only to the 4 cells with content. |
Hi, any news about this issue? |
I opened the xml of a file that alway shows 2 empty rows and used xmlstarlet to pretty print it. |
Am I the only one noticing this issue? |
import pyexcel_ods3
print(pyexcel_ods3.get_data('test.ods', keep_trailing_empty_cells=True))
test.ods contains a simple table
A1,B1
A2,B2
OrderedDict([('Sheet1', [['A1', 'B1'], ['A2', 'B2']])])
If add color to these 4 cells, the output of print is the same.
I add a color to the 3th row, I get a new "empty" row as output, an that's fine:
OrderedDict([('Sheet1', [['A1', 'B1'], ['A2', 'B2'], ['', ''], ['', '']])])
I remove the color from the 3th row by clicking to "No fill", I still get
OrderedDict([('Sheet1', [['A1', 'B1'], ['A2', 'B2'], ['', ''], ['', '']])])
I guess 'No fill' doesn't really remove the color info.
Removing the row by right click, does the job, no more empty row.
OrderedDict([('Sheet1', [['A1', 'B1'], ['A2', 'B2']])])
Now the more interesting part: click on column "A" (selection goes till the end of the sheet), add a color and print the table:
OrderedDict([('Sheet1', [['A1', 'B1'], ['A2', 'B2'], ['', ''], ['', '']])])
We get an extra empty row.
Now, if I remove the color form the whole column, I still get the empty row.
I shall remove column A to get rid of it but in such case I loose data.
OrderedDict([('Sheet1', [['B1'], ['B2']])])
Well, the issue is probably the same or very similar to the first case, bu in this case I have no way to work around it.
You get the very same issue if you add borders (or color) to cells C1, C2.
There are no values on these cells and you get
OrderedDict([('Sheet1', [['a1', 'b1', ''], ['a2', 'b2', '']])])
and this is fine.
Removing borders or colors is not going to remove the empty column, you have to right click and delete the column.
If select the whole rows 1 and 2, add color, the remove it, you can't get rid of the "empty" column (right click / delete on column "C" is not going to help).
OrderedDict([('Sheet1', [['a1', 'b1', ''], ['a2', 'b2', '']])])
So I think pyexcel3 shall handle cell where decorations have been totally remove and shall ignore decorations of whole rows or columns.
The text was updated successfully, but these errors were encountered: