You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...have percentage estimates be displayed to a chosen number of decimal places consistently throughout a sheet/tab.
So 1.200, 1.230 and 1.234 are presented as-is, without Excel truncating those trailing zeroes to produce the visually-inconsistent 1.2, 1.23 and 1.234.
I would have thought about a sprintf() solution, but looks like applying styles with {openxlsx} negates this:
I have attempted implementing this using base::sprintf() on the numbers but then whenever I applied a style from openxlsx e.g. to right align etc. it just defaulted to the situation I described above. openxlsx::createStyle(numFmt = “0.00”) also didn’t work for me.
The text was updated successfully, but these errors were encountered:
This worked for me on numeric columns when I use the {openxlsx} options, mentioned in #69. In other words, when I had values of 1, 1.2, 1.23 and set the options to options("openxlsx.numFmt" = "#,0.000"), they became 1.000, 1.200 and 1.230. Therefore closing this issue in favour of #69.
There's been a request to:
So
1.200
,1.230
and1.234
are presented as-is, without Excel truncating those trailing zeroes to produce the visually-inconsistent1.2
,1.23
and1.234
.I would have thought about a
sprintf()
solution, but looks like applying styles with {openxlsx} negates this:The text was updated successfully, but these errors were encountered: