Open-Cap-Table-Coalition / ocx

Open Cap eXcel (OCX) - Convert Open Cap Format (OCF) packages into a standardized Excel format.
https://opencaptablecoalition.com
Apache License 2.0
31 stars 1 forks source link

Set number format for percentage values to 2 decimal places, `-` if 0 #51

Closed pjohnmeyer closed 1 year ago

pjohnmeyer commented 1 year ago

Per the resolution of #23:

Per the LFWG, we will continue to display only 2 digits, so very small values will display as 0.00% -- the reader will have to expand the precision in Excel manually. True zero values will display as - the same as other numeric cells.

The excel-js numFmt for this still needs to be determined, but it should be derived from the default numeric format of:

https://github.com/captable/ocx/blob/3b23b2f9a4b3e3a1e1c84abefae8b0f8a88108eb/src/workbook/styles.ts#LL62C7-L62C58