From Plex-XML
Jump to: navigation, search


Why we use Open Office

Increasingly our customers are asking us for a quick and easy way to export the data they select and see in our Plex-XML web applications into a format they can use with their locally installed desktop applications.

We think that we will not be able to develop a solution for all the different desktop software formats by ourselves. There are and will be too many different file formats out there. But in order to fulfill most of these demands we have decided to use OpenOffice to do this job for us.

In our Plex-XML framework we are generating XML data as a response to a client request. Then we are using XSLT to convert the XML into HTML. This HTML is shown as a web page in a browser to the user.

From now on we are able to convert the XML response from the server into an OpenOffice spreadsheet format (.ods) as well. The resulting ods file is still an XML format. This ods file is handed over to a server side installed OpenOffice. The ods file will then be converted by OpenOffice into the format the user has selected within the web-application.

Oos 1.gif

The work flow for the user looks like this:

  • Select the data you need in the web application. For example all customers living in Italy.
  • Press the XLS or PDF button
  • Get exactly the same data you have seen in the HTML screen converted into the desktop file format you asked for.
  • While receiving the file the desktop application (e.g. Office or the Acrobat Reader) will open automatically and you are ready to work with that file.

Technical background

For some configurations we use OpenOffice as a service to create PDF/Excel and so on. So here is a little HOWTO

  1. Install OpenOffice and start it at least one time.
  2. Download and install the Windows Server 2003 Resource Kit Tools
  3. Read how to create an own service
  4. create your service named "OpenOfficeUnoServer" or whatever you want as the name
    1. run "<Path>\INSTSRV.EXE OpenOfficeUnoServer <Path>\SRVANY.EXE" where <Path> is the Path to the Resource Kit Tools
  5. Edit the registry Keys :
    1. create a key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OpenOfficeUnoServer\Parameters
    2. add there an entry "AppDirectory" with a value of the installation directory of OpenOffice eg. "C:\Program Files\ 2.0\program\"
    3. add an Entry "Application" with following Value "AppDirectory from step 2\soffice.exe -headless -accept=socket,host=,port=9000;urp;"
    4. the port should correspond to the one in web.xml
  6. Disable the license dialog of OpenOffice
    1. edit <AppDirectory>\share\registry\data\org\openoffice\Setup.xcu (for OOo 3 <AppDirectory>\Basis\share\registry\data\org\openoffice\Setup.xcu) and replace
<prop oor:name="ooSetupInstCompleted">
<prop oor:name="ooSetupShowIntro">


<prop oor:name="ooSetupInstCompleted" oor:type="xs:boolean">
<prop oor:name="LicenseAcceptDate" oor:type="xs:string">
<prop oor:name="FirstStartWizardCompleted" oor:type="xs:boolean">

where the timestamp should be later than the installation of OpenOffice

Eye.png Hint: If it doesn't work now it's a good tip to reboot your machine. Another tip is to look after a firewall blocking your requests.

64 Bit Vista

Replace step 3. and 4 with the command:

sc create "OpenOfficeUnoServer" start= auto binpath= "C:\<Path>\srvany.exe"
  • The spaces after "=" are not optional!
  • srvany.exe is part of the Windows Server 2003 Resource Kit Tools

Registry Example

  1. OoReg01.png
  2. OoReg02.png


/Applications/ -headless -nofirststartwizard -accept="socket,host=localhost,port=9000;urp;StarOffice.Service"

Other Links

Personal tools