Yet another Excel exporting discussion...

Yet another Excel exporting discussion...

diegobimdiegobim Posts: 1Questions: 0Answers: 0
edited January 2014 in TableTools
Hello there Allan! Thanks for the astounding work!

Well, I just found TableTools plugin and got really excited about its exporting features, but as pointed out in many other threads, the Excel exporting options currently outputs a csv file and not a native file... Doing some research, I found this little gem called XLSX.js (https://github.com/stephen-hardy/xlsx.js) that can generate basic xlsx files just with client side code.

There is more info available at http://blog.innovatejs.com/?tag=xlsx-js, some jsfiddle examples (like http://jsfiddle.net/innovatejs/ueETX/), but I just couldn't find any relevant documentation about the library API, but a quick look at the source code gave me some insight.

Could this be a way to go on this subject? A plugin maybe?

Thanks in advance, let me know your thoughts about it, I will try to help by any means I can.

Replies

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    Ooo - this looks very interesting indeed. Thanks for the link, I hadn't heard of this project before.

    Yes, I think that very much would work as a plug-in for TableTools.

    My problem with TableTools' export options is really how to get it to work in a nice cross browser / cross platform manner. At the moment, Flash is the only thing I've found which will let me save to a local file and copy to clipboard. HTML5 simply doesn't seem to have APIs to do that. There is the data:// protocol like XLSX.js uses, but that has limited support in older IE and very poor file name control in most current browsers. It also doesn't solve the how to export to clipboard issue.

    My plan with TableTools is actually to split it up into `dataTables.buttons.js` , `dataTables.buttons.export.js` and `dataTables.select.js` so you can select which aspects of it you want (plan is to have a nice little download builder package for 1.11...) and it should make things more maintainable as well - particularly for adding new button types like this.

    Baseline - I'm on the lookout for a good way to provide export and copy to clipboard options.

    (I went off on a bit of a tangent there - sorry!) Bottle line - yes it should be quite possible to use the XLSX.js project and I'll keep it in mind while working on the TableTools upgrade.

    Allan
This discussion has been closed.