Closed RayXia95 closed 6 years ago
I believe this is what you're looking for https://tableexport.v3.travismclarke.com/examples/cell-data-types.html
@RayXia95 - TableExport attempts to intelligently coerce cell types based on their contents using a customizable typeConfig
which contains a predicate function (per type) to determine which cell formatting to apply.
The easiest way to force a specific type is to apply a type class:
type | classname |
---|---|
string | tableexport-string |
number | tableexport-number |
boolean | tableexport-boolean |
date | tableexport-date |
e.g.
<table>
...
<td class="tableexport-string">Hello World 2018-3</td>
...
</table>
This is a pretty solid library!
However, when I am exporting to excel, the cell automatically formats my string, e.x. 'Hello World 2018-3' to 3/1/2018 and I lose the data of 'Hello World' when the sheet actually downloads. Is this intend? Could there be an API to customize the format of the cell before download.
Best, Ray