Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML to Word or Excel via PHP 1

Status
Not open for further replies.

overyde

Programmer
May 27, 2003
226
ZA
Hi,
I basically need to display data on the screen and have an option of downloading the data as a .doc or .xls. It needs to have the company's logo etc. So is there basically a way to save the html page as a word doc or excel file?

Reality is built on a foundation of dreams.
 
the easiest way is to pre-build the word and excel templates with the logos and formatting in place and the use COM to manipulate those file to add in the data where you need.

i don't know of any comprehensive tutorials on this and everytime i've thought i had a need to do this kind of manipulation it's got me so angry that i worked around the issue another way. having said all of that, there are resources on the web that at least go some way to pointing the right direction.

of course, you need access to a windows box with the applications installed (although i believe there is an old spreadsheet class in Pear).
 
Hi,

Like jpadie say - you would most likely be stuck with the dependency of COM to do that... and I've had the same struggels as described by jpadie.

I know that you're asking for a html to word/excel solution ... having said that, would pdf be an acceptable alternative for your application/needs?

Regards
 
That would be fantastic...in fact first choice. But I have to do this job kinda quickly and I tried to meddle with pdflib but what a mission! I can't even get it to work...i.e. how the hell do you install it with php5, apache2 on win?

Reality is built on a foundation of dreams.
 
Great - then have a look at
It's free, reqeires PHP4+ and no extensions except if you want to enable compression.

... look in their script menu - think you'll find something in the line of what you need in there. May take some modifications :)

Regards
 
Hey...
Good idea. I forgot about that! Thanks...

Reality is built on a foundation of dreams.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top