What sites, such as Google Docs and Zoho Writer, do to create MS Office documents

I understand that this may be just speculation, but I will be grateful for comments from everyone who has an idea about this. Something like MS Word COM add-in or OO bridge or custom implementation.

The reason I want to know is because I want to provide basic editing of documents on the Internet (really basic, mostly plain text at this stage) for the php web application. I think I will save the markup in html format and then convert to rtf / doc etc. For the convenience of the user.

+6
php ms-office documentation-generation
source share
4 answers

The Apache POI project (written in Java) offers an interface for many types of files from the MS Office suite.

You can run Java code from PHP using the PHP / Java bridge.

I used this once for an application where MS Word documents need to be indexed in a web application. I remember that everything worked out, it was rather complicated, but then everything turned out very well and quickly enough. (Unfortunately, the code was written in PHP4, and I don't own it, so I can't help you with any snippets here.)

PS I can’t send links since I am a new user, so google for "Apache POI" and "PHP / Java bridge" to go to the main page of the project.

+1
source share

This class can help you. I have never used it, but here are some links:

0
source share

They probably wrote their own, perhaps starting with wvWare or something similar. I noticed that Google Desktop on Linux seems to use wvWare to parse MS Word documents.

Documentation for Word file formats is available, but reading through it makes you realize that it will not be an easy task.

Automating Word or OpenOffice will be easiest, but there may be problems with licensing using such Word and possible concurrency problems using any of them on a web server.

0
source share

A popular way to do this is to create RTF with the .doc file extension. It works great with Word and other editors, and users remain happy that it is a "doc file"

0
source share

All Articles