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

Bump version from 2.6.1 to 2.8.0 the file generated by 2.8.0 show empty when preview with wechat on Android #1694

Closed
lilien1010 opened this issue Oct 18, 2023 · 10 comments

Comments

@lilien1010
Copy link

I revently tried this lib for test, but found a issue when generated with 2.8.0 ,when the preview the file on wechat Android, the excel show blank (which I found the text is able to copy, but the text is invisible)

Generate with 2.6.1 (visible on Android wechat)
2023-10-18_156638320231018185239.xlsx

Generate with 2.8.0 (text is invisible on Android wechat)
2023-10-18_156638320231018200449.xlsx

@xuri
Copy link
Member

xuri commented Oct 18, 2023

Thanks for your issue. This library has priority compatibility with Microsoft® Excel, Apache OpenOffice™, Libre Office, Kingsoft WPS Office, Apple Number, Google Sheets, etc., but we can not guarantee the rendering of the worksheet data is consistent across all of the Office applications and devices. I have no Android devices currently, but I have tested on iOS 17.0.3, and Tencent WeChat 8.0.42 with your attachment, and it works well. Please try to open the generated workbook with the mobile version of office applications.

@lilien1010
Copy link
Author

I also noticed that it works good on iOS and preview on wechat, I did some test on find this issue was introduced from 2.7.0.

right now the fix is to f.SetCellStyle(sheetName, "A1", "Z1000", style) for each sheet's

@xuri
Copy link
Member

xuri commented Oct 19, 2023

I have tested with Tencent WeChat 8.0.42 for Android, and the preview of 2023-10-18_156638320231018200449.xlsx works well, and the cell is displayed as blank in 2023-10-18_156638320231018185239.xlsx. This behavior was contrary to what you mentioned.

@lilien1010
Copy link
Author

Oh, sorry I might name the file incorrect. actually it's not blank, it's just the text show in color white, and you can even copy the text from the invisible cell, so I was thinking might impacted by some default StyleID that introduced from 2.7.0?

@lilien1010
Copy link
Author

Just another quick question, is there any way that I can set a default StyleID for the global *excelize.File object?

@xuri
Copy link
Member

xuri commented Oct 19, 2023

The default style ID hasn't changed in the recently released version. I think this is caused by the viewer bugs, which not compatible with internal theme parts generated by this library. Thanks for your sponsor, I'll try to investigate this recently.

@lilien1010
Copy link
Author

Thank you, I just revert our service back to 2.6.1 for production. but still hope can bump to latest version which also support Wechat Android preview.

@xuri xuri added the in progress Working in progress label Oct 19, 2023
@xuri xuri closed this as completed in 05689d6 Oct 19, 2023
@xuri
Copy link
Member

xuri commented Oct 19, 2023

I have improved compatibility with the viewer which doesn't support the default theme part namespace to resolve this issue, please try to upgrade the master branch code. This change will be released in the next version.

@xuri xuri removed the in progress Working in progress label Oct 19, 2023
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
- Improve compatibility with the viewer which doesn't support default theme part namespace
- ref qax-os#1690, support read background color style, and conditional format with default pattern type
- Update the unit tests
@lilien1010
Copy link
Author

confirmed that this have been fixed when change to
github.com/xuri/excelize/v2 v2.8.1-0.20231023160552-a8cbcfa39b7c

I think this should also fix #1700

@xuri
Copy link
Member

xuri commented Oct 25, 2023

Thanks for your feedback. The workbook generated was corrupted in issue #1700. I think maybe another reason caused that. There is still not enough info to reproduce that. I need more details about this from the author of that issue.

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

2 participants