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

Cell Comments are treated like normal text content #24

Closed
toesus opened this issue Aug 25, 2017 · 4 comments
Closed

Cell Comments are treated like normal text content #24

toesus opened this issue Aug 25, 2017 · 4 comments

Comments

@toesus
Copy link

toesus commented Aug 25, 2017

When reading a file which contains cells with comments, these comments are added to the text of the cell.

<table:table-cell table:style-name="ce227" office:value-type="string" calcext:value-type="string">
<office:annotation draw:style-name="gr2" draw:text-style-name="P2" svg:width="82.18pt" svg:height="26.62pt" svg:x="94.25pt" svg:y="0pt" draw:caption-point-x="-17.29pt" draw:caption-point-y="14.68pt"><dc:date>2017-08-25T00:00:00</dc:date>
<text:p text:style-name="P1">comment</text:p>
</office:annotation>
<text:p>key</text:p>
</table:table-cell>

The content of this cell after reading with pyexcel-ods will be comment\nkey

I think this is due to the way it is handled in def __read_text_cell(self, cell): link

It simply reads all the elements by type P, and also gets the comment-paragraph from the <office:annotation> element. Afterwards all paragraphs are joined together.

Would it be possible to look for P elements only as direct children of the table-cell?

@chfw
Copy link
Member

chfw commented Aug 25, 2017

Do mean you by ignoring office:annotation in table-cell ?

@toesus
Copy link
Author

toesus commented Aug 25, 2017

Yes, why not. Or maybe even ignore all text:p which are not direct children of table-cell, but i'm not sure if this would be too restrictive...
So i guess for me ignoring office:annotation would be ok.

@vog
Copy link

vog commented May 19, 2018

Has there been any progress on this issue in the meantime?

@chfw chfw closed this as completed in 6b80080 May 23, 2018
chfw added a commit that referenced this issue May 23, 2018
@chfw
Copy link
Member

chfw commented May 23, 2018

thanks for your interest in pyexcel-ods. It is released in 0.5.3.

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

3 participants