Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to populate Excel Spreadsheet with MySQL Data using PHP

Tags:

php

mysql

excel

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

like image 535
JM4 Avatar asked Jan 28 '26 03:01

JM4


1 Answers

You can try PHPExcel ( http://phpexcel.codeplex.com/). I think this is what you are looking for.

like image 52
Wade Avatar answered Jan 29 '26 19:01

Wade