Skip to main content
All CollectionsExcel Styling & Troubleshooting
Data Formatting: Numbers, Currency, Dates
Data Formatting: Numbers, Currency, Dates
Jonathon Fruchte avatar
Written by Jonathon Fruchte
Updated over 3 years ago

You can use the special -xls-format to set the format:

<table>
  <tr>
    <td style="-xls-format:currency_dollar">1000</td>
    <td style="-xls-format:currency_pound">1000</td>
  </tr>
  <tr>
    <td style="-xls-format:float">100.012</td>
    <td style="-xls-format:date_format1">08/23/17</td>
  </tr>
</table>

Numbers & Text Options

  • default

  • text

  • integer

  • float

  • percent float

  • percent integer

  • accounting float

  • accounting integer

  • accounting red float

  • accounting red integer

  • exponential

  • fraction_one_digit

  • fraction_two_digits

  • thousands_float

  • thousands_integer

Currency Options

  • currency_dollar

  • currency_euro_prefix

  • currency_float_euro_prefix

  • currency_euro_suffix

  • currency_japanese_yen

  • currency_pound

Dates & Times Options

  • date_format1 (m/d/yy)

  • date_format2 (d-mmm-yy)

  • date_format3 (d-mmm)

  • date_format4 (mmm-yy)

  • date_format5 (h:mm AM/PM)

  • date_format6 (h:mm:ss AM/PM)

  • date_format7 (h:mm)

  • date_format8 (h:mm:ss)

  • date_format9 (m/d/yy h:mm)

  • date_format10 (d/m/yy)

  • date_format11 (d/m/yy h:mm:ss) (xlsx-only)

  • date_format12 (dd.MM.yyyy) (xlsx-only)

Note: If you use a number format on a text or date cell, the results may be unpredictable.

Did this answer your question?