Export DataTable to excel

191 views
Skip to first unread message

Nitin

unread,
May 31, 2010, 9:54:56 AM5/31/10
to Google Visualization API
Is it possible to export google.visualization.DataTable() to excel?

I have data created like :
var data = new google.visualization.DataTable();
data.addColumn()....
data.addRow()....

Now I need to add a button, on click of which the data needs to be
exported in the table format.
Please let me know, where can I find some such kind of example.

Thanks and Regards
Nitin

chrissky

unread,
May 31, 2010, 8:51:01 PM5/31/10
to Google Visualization API
The way I do this is to
1. save to JSON on the client-side
2. send the JSON to the server via XMLHTTP
3. on server, convert JSON to XML
4. use XSLT to create Excel compatible document and send back to
browser with correct MIME type specified so that it loads into Excel

tobe

unread,
May 28, 2012, 1:57:11 PM5/28/12
to google-visua...@googlegroups.com
can you please post a complete example? 
I am afraid that I do not know how to do some of the steps :-(

Reply all
Reply to author
Forward
0 new messages