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

BUG: incorrect handling of line breaks in OdsWriter #55728

Open
3 tasks done
dimastbk opened this issue Oct 27, 2023 · 1 comment
Open
3 tasks done

BUG: incorrect handling of line breaks in OdsWriter #55728

dimastbk opened this issue Oct 27, 2023 · 1 comment

Comments

@dimastbk
Copy link
Contributor

dimastbk commented Oct 27, 2023

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

df = pd.DataFrame(["test\ntest"])
df.to_excel("test.ods")

Issue Description

<table:table-cell office:value-type="string" office:string-value="test&#10;test"><text:p>test
test</text:p></table:table-cell>

I think, this is a bug in ODSWriter, which should convert \n to text:p. Below are files from popular office applications:

And handlers in some ods readers:

Originally posted by @dimastbk in #53924 (comment)

Expected Behavior

Resave example in LibreOffice:

<table:table-cell office:value-type="string"><text:p>test<text:line-break/>test</text:p></table:table-cell>

Create an example in LibreOffice:

<table:table-cell office:value-type="string"><text:p>test</text:p><text:p>test</text:p></table:table-cell>
@dimastbk
Copy link
Contributor Author

Oops, I created this issue with "reference in new issue". Please, add the label "Bug".

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