简体   繁体   English

将我的Google Chart(表格)数据导出为ex​​cel或csv

[英]Export my Google Chart (table) data to excel or csv

I have a google chart which is a table and I need to have an option to export the data to excel or csv. 我有一个谷歌图表是一个表,我需要有一个选项将数据导出到excel或csv。

Can this be done within google charts API? 这可以在谷歌图表API中完成吗? I found a few pages with code but that was with the data coming from google docs where as my data is coming from mySQL. 我找到了几个包含代码的页面,但是这些数据来自谷歌文档,因为我的数据来自mySQL。 My table also has some StringFilters so the exported data should only be the data left after filtering. 我的表也有一些StringFilters,因此导出的数据应该只是过滤后留下的数据。

If this can't be dont via the API what would be the best way to do this... Can I get the filtered data into any other format that I can use? 如果这不能通过API,这将是最好的方法...我可以将过滤后的数据转换成我可以使用的任何其他格式吗?

Any help is much appreciated Thanks 任何帮助非常感谢谢谢

Upload to a Google Spreadsheet using PHP (you may want to use ajax for this) or server side language of your choice and convert to Excel from there. 使用PHP(您可能希望使用ajax)或您选择的服务器端语言上传到Google电子表格,然后从那里转换为Excel。

OR 要么

Use the built in toolbar functionality: 使用内置工具栏功能:

https://developers.google.com/chart/interactive/docs/gallery/toolbar https://developers.google.com/chart/interactive/docs/gallery/toolbar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM