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

Custom format for 0 is ignored #415

Open
GrahamTheCoder opened this issue Jun 16, 2021 · 3 comments
Open

Custom format for 0 is ignored #415

GrahamTheCoder opened this issue Jun 16, 2021 · 3 comments

Comments

@GrahamTheCoder
Copy link

Description

If I use custom format #,###;-#,###;- on a cell containing a 0, it should display -, but actually displays 0.

To Reproduce

  1. Set the custom format of a cell to #,###;-#,###;-
  2. Set the data value of that cell to 0
  3. Observe rendered cell

Pre-made spredsheet (made in recent excel version):
CustomFormatDashForZero.xlsx

_grid.Load(@"C:\path\to\CustomFormatDashForZero.xlsx", FileFormat._Auto);

Screenshots

Left: Excel
Right: Reogrid
image

Edition

Which edition of ReoGrid do you using?

  • WPF

Environment

  • OS: Windows 10
  • Language of OS: English
@GrahamTheCoder
Copy link
Author

Official docs for this feature are available (found from #336)
https://support.office.com/en-us/article/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68
image

@jingwood
Copy link
Member

@GrahamTheCoder Thanks! I will try to fix this within some days.

@64237442
Copy link

I have the same problems,
My data formats are:
#,##0,
Red

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants