toExcel() problems

Two Problems using toExcel:

  • When i have datatable containing some special chars (UTF-8) they come to excel as encoded values… Ӓ any suggestion?

  • When i use Safari it completely do not work, even at your samples. It ends up with an error message (Safari 9.3.1)

Can you share a snippet or a link where the problem with encoding can be checked ?

As for the issue in the Safari, I can confirm it. Safari doesn’t allow to define the file name for client side file downloads. This is limitation of the browser ( which actually must be already resolved in latest tech preview of Safari )

There is no beautiful workaround for the issue. As a temporary solution, It is possible to place a simple mirror script on a server, which will reflect the data from the client-side export, along with a valid file name.

Encoding… snippet: http://webix.com/snippet/7d4329db

Safari: in Version 10.0 (12602.1.50.0.10) still not working :frowning:
Do not understand your Mirrorscript-Workaround - how would it work?

In your snippet, you are using HTML-entity, not a UTF character.
Check the updated snippet, here the real Unicode char is used, and it is correctly included in the export file.

http://webix.com/snippet/491c90a4

You’re right. But is there a (convenient) way to convert HTML-entities to Characters on Export, for ä-ö-ü etc. ?

There are no special events|templates

It is possible to redefine the templates for each column during export to ms-excel, but it is not convenient, as you need to hardcode which columns will be exported and all their properties.

http://docs.webix.com/desktop__data_components_export.html#customizingexporttoexcel

Template function must be not a string, as in the above sample, but a custom js function which will do the necessary data transformation.