Export my Google Chart (table) data to excel or csv - php

I have a google chart which is a table and I need to have an option to export the data to excel or csv.
Can this be done within google charts 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. My table also has some StringFilters so the exported data should only be the data left after filtering.
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?
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.
OR
Use the built in toolbar functionality:
https://developers.google.com/chart/interactive/docs/gallery/toolbar

Related

Is there any way to export fusion chart in excel using custom export buttons?

I am using fusioncharts/3.2.4 library for rendering charts on webpage. I searched on google but could not find an answer to how can I export fusion charts in excel/PDF using custom export buttons?
Note: I dont want to use any builtin library aswell.
I searched and found that fusioncharts/3.2.4 does not provide native excel export functionality.
Thanks in advance.
i'm working with the 3.11.3 and doesn't appear any at the XLS but the PNG and PDF work well.
but this can answer your question: i found something that can help you
You can explicitly use action based framework for this and export the excel in the way you want. I have used Apache POI for this, but you can use any of the library for this.
If you want the image of this chart as a part of excel, you can create the string of chart with the use of any backend technology and embed it with a static html content, making static html file.
Test the file by opening in browser, if it is same as that of your application expectation.
Then use 'wkhtmltoimage-0.12.5-1.exe' to generate graph image with proper wait time, and embed this generated image inthe new sheet of the excel file.

Filling a Tablesorter with data

Has anybody got any HTML code/know if its possible to fill a table with data from a excel spreadsheet uploaded to the site directory?
I want to display a table of data on my PHP site, and wondered if it is possible to just add the data to a excel spreadsheet and update in the site directory rather than have all the information manually added as HTML rows.
You might want to try out Google Sheets - you can import data from Excel.
Then you can use Sheetrock.
Sheetrock is a JavaScript library for querying, retrieving, and displaying data from Google Sheets. In other words, use a Google spreadsheet as your database! Load entire worksheets or leverage SQL-like queries to sort, group, and filter data. All you need is the URL of a public Google Sheet.
The main limitations are:
As stated in the description. The Google Sheet needs to be public.
This javascript method may not be as fast as php.

How to generate graphical report from a table?

I'm fairly new to wordpress and I like to ask on how to do or what plugins to use for a specific task.
I am currently using a table plugin (tablepress) and I'd like to use the data from my input to generate a graph (pie or donut chart). Is there a way (or plugin) I could make it? Also if I want to use that data on other events, do I have to manipulate the database manually? Thanks!
The "TablePress" plugin gives you an option of exporting you tables in CSV format. The "TablePress" stores your table's data in the database in the "posts" table.
After exporting you can use the "Visualizer" plugin to then create charts from the exported CSV file.
Take a read of the "Visualizer" plugin's knowledge base to figure out how to use it.
Reference:
StackOverflow link relating to Wordpress Charts Plugin - Wordpress Charts Plugin?
Let me know if this works for you.

Export charts/data into powerpoint and excel from web application

Charts and Tables display data from database on a webpage. Is there way to export the data and charts as displayed into Excel and Powerpoint?
It's possible using libraries like PHPExcel and PHPPowerPoint, why not take a look at those and then come back if you have any specific problems

Google Chart without Google Spreadsheet

I have a few questions regarding Google Chart Tools.
Do we actually need a spreadsheet to populate the charts?
Are we allowed to query a SQL Database and use the results as the data for the chart? If yes, in what format should it be?
This will be my first time using Google Chart Tools so I am confused about how things must be done. Thanks!
you can use json as data source, so if you want, you could make a page that returns the query result in json format. Its all in the doc
http://code.google.com/apis/chart/interactive/docs/dev/implementing_data_source.html
and there's a good exemple in the code playground:
http://code.google.com/apis/ajax/playground/?type=visualization#chartwrapper_with_remote_data
Good Luck

Categories