How to insert data into existing MS Excel document from php?
Posted on 2004-04-08
I have a web app written in php/mysql running on linux server. I also have an existing excel document (preformatted with fonts, formulas,etc). I want to be able to insert data from the mysql database into specific cells in the Excel worksheet.
I have fairly extensive knowledge of handling the database stuff with php/mysql. What I need is a way to get the data from php to the specific cells in Excel. I've seen stuff on creating dynamic excel documents, but my excel sheet is already created, I just need to get data into it. I'd also like to be able to save that excel document with a new name each time i do an export. This way I can keep a blank template and repeat this process with new data as often as I want.
So, in short, I need to be able to open an existing excel document, drop some data in some specific cells, and then save the excel document with a new name while preserving the original excel document.
Any help is much appreciated!