Jump to content

Using PHP to modify Excel Spreadsheet forms


stervyatnik

Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.