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

Why is the Excel export speed slow after setting custom number formats #2026

Open
YiTianChiSiDun1 opened this issue Nov 13, 2024 · 1 comment
Labels
needs more info This issue can't reproduce, need more info

Comments

@YiTianChiSiDun1
Copy link

YiTianChiSiDun1 commented Nov 13, 2024

Description
Why is the Excel export speed slow after setting custom number formats?

In a 200*300 Excel report. The logic previously was to not fill cells with data that was 0, but the new requirement is to fill and display cells with 0 data as invisible. Upon inquiry, I found that the following method can be used to set the custom number format:
style := excelize.Style{} customerNumStyle := "0;-0;;@" style.CustomNumFmt = &customerNumStyle
However, after setting the style, I found that the export speed of Excel has become very slow. Tasks that used to be completed in less than a second now might require waiting for three to four seconds. Is there a way to solve this?

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Output of go version:

1.22.5

Excelize version or commit ID:

v2.8.1

Environment details (OS, Microsoft Excel™ version, physical, etc.):
Windows11、Microsoft Excel 2019

@xuri
Copy link
Member

xuri commented Nov 14, 2024

There is not enough info of code and attachments to reproduce this issue. Could you follow the issue template to show us a complete, standalone example program or reproducible demo? If you open an existing workbook, please provide the file attachment without confidential info.

@xuri xuri added the needs more info This issue can't reproduce, need more info label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info This issue can't reproduce, need more info
Projects
None yet
Development

No branches or pull requests

2 participants