I'm trying to mimic the way a "general" cell shows a decimal point only if there are decimal places, but I want thousands separators which "general" doesn't provide. I'm using a custom number format string in a SSRS report: #,##0.######
. When the report is exported to Excel, the format string comes through as [$-en-US,1]#,##0.######
. Removing the locale specification makes no difference to my problem.
This works except for one thing: Excel always displays a decimal point even when there are no decimal places. Given the value 1000.1
, it displays 1,000.1
as I intended. But given the value 10
, it displays 10.
instead of 10
.
Is it possible to achieve what I want?
I created a .xlsx file with the format string #,0.###
on two cells. This is how the same file looks in Excel and Calc:
0.####
as a custom format that will render the asker's15
as15
. But I get15.
.