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
Related
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.
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.
Ok, so I have a WordPress setup and a client who would like it to generate monthly reports to PDFs and save them to the server. What troubles me is, that those reports should generate charts from data imported from excel files.
How would you do that? Generate the reports clientside and let the user save the pdf to server? I believe rendering the charts on the server would not be as easy as creating the charts with chart.js in the browser.
Choosing the clientside approach I would need a way to parse CSV data (any good WordPress plugins?) then render the report with the charts and give the user a possibility to save a PDF to the server associating the file with the post.
Best approach will be to import data and create chart within html page, then use fpdf to create pdfs on the fly.
here is nice how-to integrate fpdf with worpress:
https://forrst.com/posts/FPDF_integration_with_Wordpress_for_PDF_printing-Gr4
and fpdf library:
http://www.fpdf.org/
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
Let's go ahead and get this out of the way - i realize I can generate tables with php and mysql and output in 'almost' any format I need but in this scenario, the excel spreadsheet is formatted in some strange ways (layout, color, etc) and the client won't budge. I have to use the exact excel spreadsheet.
I am trying to pull data from a mysql database with php calculations behind it and populate various cells within an Excel file. Is it possible to do this?
Thank you ahead of time
You can try PHPExcel ( http://phpexcel.codeplex.com/). I think this is what you are looking for.