linways / table-to-excel

Javascript library to create "valid" excel file from html table with styles
MIT License
226 stars 109 forks source link

Column for Currency #17

Closed sunnykoundal closed 5 years ago

sunnykoundal commented 5 years ago

I am try to add currency in excel sheet but there is no option I could found for that. Can you add that option like other data-t="c" - for currency.

rohithb commented 5 years ago

Currency formatting is already available. You can use data-num-fmt to specify the number format. For example: <td data-t="n" data-num-fmt="$ 0.00">2210.00</td> Check this example

You can use any excel cell format strings inside data-num-fmt like $#,##0.00_);[Red]($#,##0.00), _($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_) etc.

sunnykoundal commented 5 years ago

Hi Rohit Thanks for replying me!

It solves my issue. Thanks