Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Export shared strings with RichText#1099

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
alubbe merged 2 commits intoexceljs:masterfromkigh-ota:write-richtext-cell-value
Feb 6, 2020

Conversation

kigh-ota
Copy link
Contributor

@kigh-otakigh-ota commentedJan 30, 2020
edited
Loading

This PR is intended tofix#633.

When an Excel file is read, a shared string with rich text (<r>) nodes inside is correctly parsed and reconciled into aCellXform object like below.

{model:{value:{richText:[ ...]},type:Enums.ValueType.RichText,},}

However,XLSX#writeFile() converts this object into an empty cell in the exported Excel file, becauseCellXform#prepare() and#render() do nothing whenmodel.type === Enums.ValueType.RichText.

To fix this, the both methods now handleRichText in the same way asString.

@alubbealubbe merged commit301cd36 intoexceljs:masterFeb 6, 2020
@Siemienik
Copy link
Member

hmm.. should we add some documentation about these changes?

kigh-ota reacted with eyes emoji

@kigh-ota
Copy link
ContributorAuthor

@Siemienik
Which documentation do you mean, for users or for developers?
In my opinion, one for users is not mandatory.
This is because the documentation already includes an example of a rich text value with multiple styles, so users (including me) would expect that the value would be exported as is even without additional description.
https://github.com/exceljs/exceljs/blob/a2eaa9e75e477a9f5c88d54979bd95eb37571c3d/README.md#rich-text

But I'm new here, so tell me if I should consider more :)

@Siemienik
Copy link
Member

@kigh-ota ok, it's my gap, sorry abut this, You are right :)

@kigh-ota
Copy link
ContributorAuthor

@Siemienik
Thank you for your comments!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@SiemienikSiemienikSiemienik approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Existing Rich Text corrupts .xlsx on write
3 participants
@kigh-ota@Siemienik@alubbe

[8]ページ先頭

©2009-2025 Movatter.jp