Asked • 26d

How can I set contents of a spreadsheet cell to Accounting format with EPPlus?

I need to set the contents of certain columns to Accounting format. This attempt: public static readonly string NUMBER_FORMAT_ACCOUNTING = "$"; . . . bidPriceCell.Style.Numberformat.Format = NUMBER_FORMAT_ACCOUNTING; ...simply gives "$" and "-$" as the values. This attempt: public static readonly string NUMBER_FORMAT_ACCOUNTING = "$0.00"; . . . bidPriceCell.Style.Numberformat.Format = NUMBER_FORMAT_ACCOUNTING; ...gives me values such as, "$24.09" and "-$0.91" What the user wants is space between the dollar sign and the value, and parens around negative values, such as "$ 24.09" and "$ (0.91)" What string do I need to assign the Numberformat.Format property for this to work?

No expert answers yet

Answers can only be accepted by verified, expert tutors.


Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.