Writing to an Existing Excel Spreadsheet

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
stervyatnik
Forum Newbie
Posts: 1
Joined: Fri Jul 20, 2007 2:24 pm

Writing to an Existing Excel Spreadsheet

Post by stervyatnik »

Newbie here, but I have some - not a lot! - programming experience, and I'm pretty much just getting started in PHP.

I am working on a project for a company that takes orders and submits them to several companies via Excel and Word files. For example, we take an order for a T1 Internet line, and submit it to company X, using Company X's approved Excel spreadsheet form.

My idea is to use the basic approved form as a template, stored in a specified directory. When we receive an order for a product, the Web interface will automatically generate the required form(s) from the templates, and pre-populate them with existing customer data from a MySQL database. The "pre-population" only accounts for approximately one-third of the form's contents. The remaining form fields will be filled out by an order fulfillment clerk.

Using the PEAR Spreadsheet_Excel_Writer, I can generate a NEW spreadsheet and plug in data, which is way cool, but not what I need. I need to generate a new instance of an existing spreadsheet, pre-populate specific cells with appropriate data, save it with a unique filename, and allow subsequent clerks to open and modify the document. Once it's completed, we then send it to our supplier.

Does anyone know if this is possible? It seems like it should be, but I can't seem to find appropriate PEAR assets to do it.

Any help would be appreciated. Thanks in advance!

Dan Ford
Post Reply