This project has moved and is read-only. For the latest updates, please go here.

Are there any plans to add enum Number Formatting?

Jul 16, 2014 at 5:44 PM
I was just tasked to add "Accounting" formatting to the one column of a spreadsheet I've been making with your library.

Seeing as there's a NumFormat readonly property on the Cell's Style.NumberFormat property, is there any chance of adding an enum of the predefined cell styles that Excel has and using that enum to set the formatting on cells instead of having to find that the string format for "Accounting" is "($* #,##0.00);_($* (#,##0.00);_($* \"-\"??_);_??_);_(@_)". I just think that'd be something simple to implement (aside from getting those string values), and would even be willing to help work on implementing that for you.
Sep 14, 2015 at 5:30 PM
I would like a reply to this as well. I also would be willing to help with this as I was just given the same task.
Sep 14, 2015 at 5:49 PM
Just for reference, and this could be the reason they haven't done this yet, I am using Excel 2007. The format I used is slightly different than the one you provided, code below.
const string ACCOUNTING_FORMAT = "_($* #,##0.00_);_($* (#,##0.00);_($ \" - \"??_);_(@_)";
worksheet.Cells["B3"].Style.Numberformat.Format = ACCOUNTING_FORMAT;