You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.
Hi, I'have found that the data exported is in fact the td contents and there's no way to tell the table export that the value to be exported should be another (for example a data-value attribute on each td with a fall-back to the td's text)
I'm formatting the numbers with the Spanish format (dots are thousand separators and commas are decimal separators).
So, when exporting to excel, the values are not recognized as numbers.
What I would like to do is add the value to a data attribute on each td and that value goes to excel instead of the td text.
such as: <td data-value="1526.56">1.526,56</td>
Btw this should be very usefull in many other scenarios.
Any help on this?
The text was updated successfully, but these errors were encountered:
I know @danielgregorywilson has made some contributions and PRs that address the type (e.g. exporting an actual number) portion of your request. I need to circle back with him before I can get you any feedback of this, but assuming the functionality exists in js-xlsx and we can get this synced up with the alpha release, which is supposed to supersede the v3.x.x jQuery-coupled implementation. I think we can get this fixed relatively quickly.
@janscas - the cell-types and type overrides portion of your issue "formatting the numbers ... not recognized as numbers" is fixed (or rather, it has been added with the help of @danielgregorywilson) as of the latest release v4.0.0.
Cell-value replacement with an attribute is not. Although with this latest release, direct access to the locally stored data is now available, meaning that you can create your own formatting and data modification. This is a robust way to do any preprocessing you would like with the data before calling your own custom export trigger(s) (using export2file). Here is an example of this feature taken from the docs.
Hi, I'have found that the data exported is in fact the td contents and there's no way to tell the table export that the value to be exported should be another (for example a data-value attribute on each td with a fall-back to the td's text)
I'm formatting the numbers with the Spanish format (dots are thousand separators and commas are decimal separators).
So, when exporting to excel, the values are not recognized as numbers.
What I would like to do is add the value to a data attribute on each td and that value goes to excel instead of the td text.
such as:
<td data-value="1526.56">1.526,56</td>
Btw this should be very usefull in many other scenarios.
Any help on this?
The text was updated successfully, but these errors were encountered: