Excel and PDF output files

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
equinox_321
Forum Newbie
Posts: 1
Joined: Mon Feb 15, 2010 7:45 am

Excel and PDF output files

Post by equinox_321 »

Hi! I'm new to PHP programming and I have been given a task of making a report that has 2 formats: Excel and PDF... I have already done my codes using writeexcel and fpdf16 classes simultaneously... the problem I have right now is how do i output both created files (excel & pdf)... so far in my readings is that you can not issue more than 1 header() function call... and both classes have used the header() function call.. how do i go about this??? I really need to output the 2 file formats in only just one process so as to save time in of course processing the report... thanks!!
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Excel and PDF output files

Post by Darhazer »

You have to have buttons / links to each of the files, so user can download them one by one, or you have to put them in a zip file (but for this you have to alter both classes to save the file on the server, then with PclZip or other ZIP library create a ZIP archive and use header() to stream the ZIP file to the user)
Post Reply