Office documents to HTML

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
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Office documents to HTML

Post by Rovas »

I want to make some scripts that generate HTML version of various Office documents (Excel, Word, PowerPoint). From my searches on Google the tutorials and scripts I found use Windows COM objects and need IIS. Is there a free api for this that' s Linux based and is an extension of php or another posibly free alternative?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Office documents to HTML

Post by Christopher »

You might want to look into the open source office applications like Open Office, AbiWord word processor, Gnumeric spreadsheet, KWord word processor, KSpread spreadsheet, etc. These may provide a command like interface to allow you to load and save documents.
(#10850)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: Office documents to HTML

Post by RobertGonzalez »

COM objects do not require IIS. Search the PHP manual for COM objects.
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Re: Office documents to HTML

Post by Rovas »

Everah wrote:COM objects do not require IIS. Search the PHP manual for COM objects.
In the tutorials I found it was required that you have. The manual says
COM functions are only available for the Windows version of PHP
I work using Linux
Could you please post/ pm some links for com objects under Linux
Unfortunately the clients work with MS Office (various versions) :( I have been thinking to tell to save their documents as xhtml and edit those documents.
User avatar
JamesRavenscroft
Forum Newbie
Posts: 10
Joined: Thu Jan 31, 2008 3:45 am
Location: West Midlands, United Kingdom

Re: Office documents to HTML

Post by JamesRavenscroft »

Hey,

I found this article: http://www.xml.com/pub/a/2006/01/11/fro ... ffice.html that shows a macro that can be run from the commandline to convert documents from word to open office format. If you used this tutorial (which probably could be hacked to work on Linux as well), you could easily use the php exec function to do what you wanted.

Hope that helps a little :)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: Office documents to HTML

Post by RobertGonzalez »

Sorry rovas, you and I weren't speaking of the same thing. You said that COM requires IIS. I said it didn't. The manual says that it only works on Windows based PHP installs. PHP will run on Windows with just about any webserver that runs on Windows, even Apache. Just wanted to clarify that we were not talking about the same thing.

When researching COM, did you happen to read any of the links in the See Also section of the manual? Not saying you didn't, but I didn't even know those were there until I srolled about a mile and a half down that manual page.
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Re: Office documents to HTML

Post by Rovas »

I looked at the See also section
I work on a LAMP server not WAMP sorry I did let you know.
I found wvare for working with Word documents and phpExcelReader for Excel documents.
Post Reply