fast_excel
fast_excel copied to clipboard
Money formatting with $ at the far left.
Just wondering if you know what kind of formatting trickery might be used to get the '$' aligned far left with the numbers aligned right? Thanks!
That's Accounting formatting. I wonder if just using the Accounting formatting from Excel when you select that would work:
_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)
Confirmed!
Here is the format I used to get that formatting:
format = workbook.number_format( '_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)' )
write_number( row_number, cell_number, value.to_d, format )
Of course, I'm not sure if you wanted it to be full Accounting format or not, with the negative values in parentheses, but now that you know you can have the currency symbol all the way to the left, you can easily modify this format to get the one that you like.
Powerful stuff!
@Paxa You can close this "Issue".