stervyatnik Posted July 23, 2007 Share Posted July 23, 2007 Hello, all! New guy here, but I've got some experience with PHP. My company works with third-party suppliers to furnish telecommunications products to customers. The third-party suppliers have provided us a number of Microsoft Word and Microsoft Excel forms to submit order information. These forms are nicely laid out and perfect for printing, but here in the 21st Century, I want to be able to use our computers to populate - as much as we can - these forms, to reduce or eliminate the need to print these out and fill them out by hand. I would like to use our MySQL database to cull information out of, and put the data into specified fields in these third-party forms. I've seen a lot of online tutorials that allow you to generate a simple Excel file, but my application is a little different. We pretty much HAVE to stay with the 20th Century forms, with all the colors, text styles, etc. I want to take one of these formatted Excel forms, plug data from our MySQL database into it, and then save the modified form with a unique filename (associated with the customer order number). Then, a person working on fulfilling the order can open up the "instance" of the form, and fill out other, additional data as necessary. Once it's completed on the computer screen, we send it to the third-party supplier via email attachment. (What THEY do with it from there is up to them - I'm interested in automating OUR process.) I used PEAR and the Spreadsheet::WriteExcel module to generate a spreadsheet, but again, not quite what I'm looking for. I need to be able to plug specific data into specific cells - for example, plug the Company Name into cell B8 in an Excel Spreadsheet, so as to maintain the form's style and formatting integrity. Can anyone point me in the right direction? Any insights would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
Wildbug Posted July 23, 2007 Share Posted July 23, 2007 http://www.devarticles.com/c/a/Apache/Manupulating-Excel-Spreadsheets-with-Apache-POI/ There's a Java/Apache method. I'm not aware of any PHP. The Perl solutions look like only writing, not reading. Quote Link to comment Share on other sites More sharing options...
ss32 Posted July 23, 2007 Share Posted July 23, 2007 you would have to write a script that would read the excel sheet's data into memory and store that into an array. from there you could access the cells directly. what that script looks like i have no idea; i have never tried to disassemble a spreadsheet file. maybe this will help: sc.openoffice.org/excelfileformat.pdf my question is, though, why not use access? isnt that what is was designed for? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.