hcsnemrebured hcsnemrebured - 1 year ago 52
Javascript Question

Special characters not showing when exporting HTML table to XLS

I have an HTML table generated from a query to a WordPress database. Everything is working fine with the table, all the values are showing as expected, but when I export the table to an XLS file, everything works fine except for the special characters.
The site is in spanish, so it uses a lot of special characters like Ñ Ó Á

This is the plugin that I'm using table2excel

Every help or hint would be appreciated.

Extra information: There's a possible solution that is not working for me, it says that i need to add this line
<meta http-equiv="Content-Type" content="\"text/html;" charset="utf-8\"">
right after the
tag of the .js file of the plugin but when i add the line, the plugin didn't work at all.

Answer Source

Ok, i found the answer myself, and the only problem with the tag that i added is the formatting, instead of

<meta http-equiv="Content-Type" content="\"text/html;" charset="utf-8\"">

It should be:

<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\">

Now it's working without problems. Thanks!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download