ReoGrid icon indicating copy to clipboard operation
ReoGrid copied to clipboard

Custom format for 0 is ignored

Open GrahamTheCoder opened this issue 3 years ago • 3 comments

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 avatar Jun 16 '21 18:06 GrahamTheCoder

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

GrahamTheCoder avatar Jun 17 '21 12:06 GrahamTheCoder

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

jingwood avatar Jun 19 '21 02:06 jingwood

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

64237442 avatar Nov 19 '21 08:11 64237442