Copying to clipboard
Copying to clipboard
I've read over the API and features, and do not see an easy way to copy the contents of the table onto the clipboard. My goal is to get the table into excel, and the table being built is usually a few thousand lines long, which makes manually highlighting a major pain. I've seen the "copy to clipboard" feature on a few sites, so I was hoping dataTables would have this feature also (I'm through the API call fnGetNodes?). I'm assuming it can, it's just a bit over my head!
Any help would be greatly appreciated!
Any help would be greatly appreciated!
This discussion has been closed.
Replies
1. Go through the absolute nightmare of trying to use copy and paste in the browser (Ben and Dion over at Mozilla labs have been doing this recently: http://almaer.com/blog/supporting-the-system-clipboard-in-your-web-applications-what-a-pain
2. Integrate with Flash. It requires the Flash plug-in of course, but it should be straight forward. This is something I've been meaning to add for DataTables for a while - I'll try to get around to it soon :-)
Regards,
Allan
I ended up finding a nice solution that allows you feed any table to a tiny php page that saves the table as an excel file. It loses the formatting, but it works good enough!