[vwnc] OpenOffice Connect?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] OpenOffice Connect?

Nowak, Helge
OpenOffice Connect?

Dear all,

has anybody written an interface to OpenOffice? I checked the Public Store but couldn't find anything.

TIA
Helge

**************************************************************
Helge K. Nowak
Technical Account Manager Cincom Smalltalk
Cincom Systems GmbH & Co. oHG
Am Kronberger Hang 4
D-65824 Schwalbach/Ts.
Tel.: +49-(0)89-89664494
Mobil: +49-(0)172-7400402
Fax: +49-(0)89-89664495
Email: [hidden email]
Web: http://smalltalk.cincom.com

Alles über Cincom Smalltalk:
http://smalltalk.cincom.com

Bild (Metafile)

Ein Standpunkt ist ein geistiger Horizont vom Radius Null.
-- Albert Einstein

Geschäftsführer/Managing Directors: Thomas M. Nies, Gerald L. Shawhan
oHG mit Sitz/based in Schwalbach/Ts. (Amtsgericht Königstein/Ts. HRA 2653)
Pers. haftender Gesellschafter/Partner liable to unlimited extent:
Cincom Systems Verwaltungsgesellschaft mbH (Amtsgericht Königstein/Ts. HRB 5069)
**************************************************************



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

ole0.bmp (247K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] OpenOffice Connect?

Mathieu van Echtelt-2
Hello,

We use open office to generate ms office documents (excel and word) in
2007 and 97 formats. (some of our customers still use excel 97)

our approach: vw connects to a python script which connects to a
headless running open office server over an so called "uno bridge"
(there is a python lib for uno which is something like com for open
office) and this executes open office scripts which does the actual
transformation to ms-office formats and pdf. In vw you only create the
odf-xml.

I'll sent these scripts to the list before the end of next week. (need
time, and i'm still not 100% recovered from a bike accident)

However,  even though it helped us for several years in creating
reports and letters on the fly, we are just replacing it by another
tool: aspose.com to have better control over ms office document
creation. (we use the jni port to connect vw to aspose.java).

We changed to aspose because open office's transformations to ms
office doesn't work 100% as you would expect, and this can be very
irritating and you have to do many trails&errors to get what you want.
Even though aspose costs money, we are much happier.

Greetings,

Mathieu van echtelt

2009/6/19 Nowak, Helge <[hidden email]>:

> Dear all,
>
> has anybody written an interface to OpenOffice? I checked the Public Store
> but couldn't find anything.
>
> TIA
> Helge
>
> **************************************************************
> Helge K. Nowak
> Technical Account Manager Cincom Smalltalk
> Cincom Systems GmbH & Co. oHG
> Am Kronberger Hang 4
> D-65824 Schwalbach/Ts.
> Tel.: +49-(0)89-89664494
> Mobil: +49-(0)172-7400402
> Fax: +49-(0)89-89664495
> Email: mailto:[hidden email]
> Web: http://smalltalk.cincom.com
>
> Alles über Cincom Smalltalk:
> http://smalltalk.cincom.com
>
> Ein Standpunkt ist ein geistiger Horizont vom Radius Null.
> -- Albert Einstein
>
> Geschäftsführer/Managing Directors: Thomas M. Nies, Gerald L. Shawhan
> oHG mit Sitz/based in Schwalbach/Ts. (Amtsgericht Königstein/Ts. HRA 2653)
> Pers. haftender Gesellschafter/Partner liable to unlimited extent:
> Cincom Systems Verwaltungsgesellschaft mbH (Amtsgericht Königstein/Ts. HRB
> 5069)
> **************************************************************
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>



--
AG5 - Product manager

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] OpenOffice Connect?

reinier van oosten-2
In reply to this post by Nowak, Helge
Hi Helge,
What is it exactly that you want. Both reading and writing, interacting, or just creating a document (including macros) that can be read by OpenOffice. 
I have a very simple creator of MS Office 2004 xml format. Both openoffice and ms office can read this format. 
Reinier van Oosten

tel: 079-3437073
gsm: 0651335993
skype: rvoosten




On Jun 19, 2009, at 4:59 PM, Nowak, Helge wrote:

Dear all,

has anybody written an interface to OpenOffice? I checked the Public Store but couldn't find anything.

TIA
Helge

**************************************************************
Helge K. Nowak
Technical Account Manager Cincom Smalltalk
Cincom Systems GmbH & Co. oHG
Am Kronberger Hang 4
D-65824 Schwalbach/Ts.
Tel.: +49-(0)89-89664494
Mobil: +49-(0)172-7400402
Fax: +49-(0)89-89664495
Email: [hidden email]
Web: http://smalltalk.cincom.com

Alles über Cincom Smalltalk:
http://smalltalk.cincom.com

Bild (Metafile)

Ein Standpunkt ist ein geistiger Horizont vom Radius Null.
-- Albert Einstein

Geschäftsführer/Managing Directors: Thomas M. Nies, Gerald L. Shawhan
oHG mit Sitz/based in Schwalbach/Ts. (Amtsgericht Königstein/Ts. HRA 2653)
Pers. haftender Gesellschafter/Partner liable to unlimited extent:
Cincom Systems Verwaltungsgesellschaft mbH (Amtsgericht Königstein/Ts. HRB 5069)
**************************************************************


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] OpenOffice Connect?

Alexander Augustin

Hello,

 

I checked whether it is possible to access OpenOffice using COM Connect Automation.

There is a class registered as “com.sun.star.ServiceManager” which could be used as starting point.

Currently there are some problems which prevent this.

 

Some details for interested people:

First, OpenOffice does not seem to provide a type library. So the Automation Browser is unable to provide any information about OpenOffice.

So developers would have to know which methods to call and which parameters to pass.
Also, they would have to specify to use the newVariantPolicy in the DispatchDriver in order to prevent VisualWorks from trying to look up type information.

 

In addition to this, OpenOffice automation objects (e.g. the ServiceManager) do not seem to implement the IDispatch interface completely,
which causes additional problems.

 

I am working at the described problems to make it nevertheless possible to access OpenOffice (and maybe other software with similar issues)
using COM Connect.

 

Best regards,

Alexander Augustin

 

 

Alexander Augustin (Dipl.-Informatiker),
Email:
[hidden email] ,
Tel: +49-3496-214329, Fax: +49-3496-214712
Georg Heeg eK, Köthen
Handelsregister: Amtsgericht Dortmund A 12812


Von: [hidden email] [mailto:[hidden email]] Im Auftrag von reinier van oosten
Gesendet: Samstag, 20. Juni 2009 20:37
An: Nowak, Helge
Cc: [hidden email]
Betreff: Re: [vwnc] OpenOffice Connect?

 

Hi Helge,

What is it exactly that you want. Both reading and writing, interacting, or just creating a document (including macros) that can be read by OpenOffice. 

I have a very simple creator of MS Office 2004 xml format. Both openoffice and ms office can read this format. 

Reinier van Oosten

 

tel: 079-3437073

gsm: 0651335993

skype: rvoosten

 



 

 

On Jun 19, 2009, at 4:59 PM, Nowak, Helge wrote:



Dear all,

has anybody written an interface to OpenOffice? I checked the Public Store but couldn't find anything.

TIA
Helge

**************************************************************
Helge K. Nowak
Technical Account Manager Cincom Smalltalk
Cincom Systems GmbH & Co. oHG
Am Kronberger Hang 4
D-65824 Schwalbach/Ts.
Tel.: +49-(0)89-89664494
Mobil: +49-(0)172-7400402
Fax: +49-(0)89-89664495
Email: [hidden email]
Web: http://smalltalk.cincom.com

Alles über Cincom Smalltalk:
http://smalltalk.cincom.com

Bild (Metafile)

Ein Standpunkt ist ein geistiger Horizont vom Radius Null.
-- Albert Einstein

Geschäftsführer/Managing Directors: Thomas M. Nies, Gerald L. Shawhan
oHG mit Sitz/based in Schwalbach/Ts. (Amtsgericht Königstein/Ts. HRA 2653)
Pers. haftender Gesellschafter/Partner liable to unlimited extent:
Cincom Systems Verwaltungsgesellschaft mbH (Amtsgericht Königstein/Ts. HRB 5069)
**************************************************************

 

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

 


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] OpenOffice Connect?

Annick
I have used UNO with Java, which is a kind of automation with interfaces. There are a good number of examples under :
It requires opening a socket in Openoffice and enabling the java interpret.
It's quite slow, but works well.
Annick Fron

Le 22 juin 09 à 11:44, Alexander Augustin a écrit :

Hello,
 
I checked whether it is possible to access OpenOffice using COM Connect Automation.
There is a class registered as “com.sun.star.ServiceManager” which could be used as starting point.
Currently there are some problems which prevent this.
 
Some details for interested people:
First, OpenOffice does not seem to provide a type library. So the Automation Browser is unable to provide any information about OpenOffice.
So developers would have to know which methods to call and which parameters to pass. 
Also, they would have to specify to use the newVariantPolicy in the DispatchDriver in order to prevent VisualWorks from trying to look up type information.
 
In addition to this, OpenOffice automation objects (e.g. the ServiceManager) do not seem to implement the IDispatch interface completely, 
which causes additional problems.
 
I am working at the described problems to make it nevertheless possible to access OpenOffice (and maybe other software with similar issues)
using COM Connect.
 
Best regards,
Alexander Augustin
 
 
Alexander Augustin (Dipl.-Informatiker), 
Email: 
[hidden email] , 
Tel: +49-3496-214329, Fax: +49-3496-214712
Georg Heeg eK, Köthen
Handelsregister: Amtsgericht Dortmund A 12812

Von: [hidden email] [[hidden email]] Im Auftrag von reinier van oosten
Gesendet: Samstag, 20. Juni 2009 20:37
An: Nowak, Helge
Cc: [hidden email]
Betreff: Re: [vwnc] OpenOffice Connect?
 
Hi Helge,
What is it exactly that you want. Both reading and writing, interacting, or just creating a document (including macros) that can be read by OpenOffice. 
I have a very simple creator of MS Office 2004 xml format. Both openoffice and ms office can read this format. 
Reinier van Oosten
 
tel: 079-3437073
gsm: 0651335993
skype: rvoosten
 


 
 
On Jun 19, 2009, at 4:59 PM, Nowak, Helge wrote:


Dear all,

has anybody written an interface to OpenOffice? I checked the Public Store but couldn't find anything.

TIA 
Helge

************************************************************** 
Helge K. Nowak 
Technical Account Manager Cincom Smalltalk 
Cincom Systems GmbH & Co. oHG 
Am Kronberger Hang 4 
D-65824 Schwalbach/Ts. 
Tel.: +49-(0)89-89664494 
Mobil: +49-(0)172-7400402 
Fax: +49-(0)89-89664495 
Email: [hidden email] 
Web: http://smalltalk.cincom.com

Alles über Cincom Smalltalk: 
http://smalltalk.cincom.com

Bild (Metafile)

Ein Standpunkt ist ein geistiger Horizont vom Radius Null. 
-- Albert Einstein

Geschäftsführer/Managing Directors: Thomas M. Nies, Gerald L. Shawhan 
oHG mit Sitz/based in Schwalbach/Ts. (Amtsgericht Königstein/Ts. HRA 2653) 
Pers. haftender Gesellschafter/Partner liable to unlimited extent: 
Cincom Systems Verwaltungsgesellschaft mbH (Amtsgericht Königstein/Ts. HRB 5069) 
**************************************************************

 
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
 
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] OpenOffice Connect?

Nowak, Helge
the request came from a client
he actually wants to use OpenOffice as an alternative to MS Office (Word and Excel). I. e. he needs to call and open OpenOffice, feed in data and kick-off functions/macros to generate documents, charts, etc. The things you do on Windows usually with OLE.
 
But OLE is not an option since it should be cross platform (Windows and Linux).
 
Going via Java or Python has (probably) a performance disadvatange and is complicating the architecture even more.
 
It seems to me that creating a Smalltalk language binding and bridge/adapter for the UNO architecture would be best. Did anyone try that one?
 
Or could one use Binary UNO SAL (http://wiki.services.openoffice.org/wiki/Porting/Modules/SAL) with DLC&C?
 
TIA
Helge

Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Annick Fron
Gesendet: Montag, 22. Juni 2009 16:04
An: vwnc NC
Betreff: Re: [vwnc] OpenOffice Connect?

I have used UNO with Java, which is a kind of automation with interfaces. There are a good number of examples under :
It requires opening a socket in Openoffice and enabling the java interpret.
It's quite slow, but works well.
Annick Fron

Le 22 juin 09 à 11:44, Alexander Augustin a écrit :

Hello,
I checked whether it is possible to access OpenOffice using COM Connect Automation.
There is a class registered as “com.sun.star.ServiceManager” which could be used as starting point.
Currently there are some problems which prevent this.
Some details for interested people:
First, OpenOffice does not seem to provide a type library. So the Automation Browser is unable to provide any information about OpenOffice.
So developers would have to know which methods to call and which parameters to pass. 
Also, they would have to specify to use the newVariantPolicy in the DispatchDriver in order to prevent VisualWorks from trying to look up type information.
In addition to this, OpenOffice automation objects (e.g. the ServiceManager) do not seem to implement the IDispatch interface completely, 
which causes additional problems.
I am working at the described problems to make it nevertheless possible to access OpenOffice (and maybe other software with similar issues)
using COM Connect.
Best regards,
Alexander Augustin
Alexander Augustin (Dipl.-Informatiker), 
Email: 
[hidden email] , 
Tel: +49-3496-214329, Fax: +49-3496-214712
Georg Heeg eK, Köthen
Handelsregister: Amtsgericht Dortmund A 12812

Von: [hidden email] [[hidden email]] Im Auftrag von reinier van oosten
Gesendet: Samstag, 20. Juni 2009 20:37
An: Nowak, Helge
Cc: [hidden email]
Betreff: Re: [vwnc] OpenOffice Connect?
Hi Helge,
What is it exactly that you want. Both reading and writing, interacting, or just creating a document (including macros) that can be read by OpenOffice. 
I have a very simple creator of MS Office 2004 xml format. Both openoffice and ms office can read this format. 
Reinier van Oosten
tel: 079-3437073
gsm: 0651335993
skype: rvoosten


On Jun 19, 2009, at 4:59 PM, Nowak, Helge wrote:


Dear all,

has anybody written an interface to OpenOffice? I checked the Public Store but couldn't find anything.

TIA 
Helge

************************************************************** 
Helge K. Nowak 
Technical Account Manager Cincom Smalltalk 
Cincom Systems GmbH & Co. oHG 
Am Kronberger Hang 4 
D-65824 Schwalbach/Ts. 
Tel.: +49-(0)89-89664494 
Mobil: +49-(0)172-7400402 
Fax: +49-(0)89-89664495 
Email: [hidden email] 
Web: http://smalltalk.cincom.com

Alles über Cincom Smalltalk: 
http://smalltalk.cincom.com

Bild (Metafile)

Ein Standpunkt ist ein geistiger Horizont vom Radius Null. 
-- Albert Einstein

Geschäftsführer/Managing Directors: Thomas M. Nies, Gerald L. Shawhan 
oHG mit Sitz/based in Schwalbach/Ts. (Amtsgericht Königstein/Ts. HRA 2653) 
Pers. haftender Gesellschafter/Partner liable to unlimited extent: 
Cincom Systems Verwaltungsgesellschaft mbH (Amtsgericht Königstein/Ts. HRB 5069) 
**************************************************************

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] OpenOffice Connect?

Mathieu van Echtelt-2
As promised the scripts I mentioned in former post, which shows our
usage of open office. by using the python UNO bridge, we are able to
control a headless running open office server from VisualWorks.
greetings,
Mathieu van Echtelt

An example OpenOffice macro (a "sava as ms excel 97" command)

Sub SaveAsExcel97( cFile )
  ' mostly a copy of SaveAsPDF
  Dim FileProperties_in(0) as New com.sun.star.beans.PropertyValue
  Dim FileProperties_out(0) as New com.sun.star.beans.PropertyValue
  cURL = ConvertToURL( cFile )
  FileProperties_in(0).name = "Hidden"
  FileProperties_in(0).value = True
  oDoc = StarDesktop.loadComponentFromURL( cURL, "_hidden", 0,
FileProperties_in())
  cFile = Left( cFile, Len( cFile ) - 4 ) + "97.xls"
  cURL = ConvertToURL( cFile )
  FileProperties_out(0).name = "FilterName"
  FileProperties_out(0).value = "MS Excel 97"
  oDoc.storeToURL( cURL, FileProperties_out())
  oDoc.close( True )
End Sub


the python script which calls the macro script over uno

import sys
import uno

# get the uno component context from the PyUNO runtime
localContext = uno.getComponentContext()

# create the UnoUrlResolver
resolver = localContext.ServiceManager.createInstanceWithContext(
                               "com.sun.star.bridge.UnoUrlResolver",
localContext )

# connect to the running office
ctx = resolver.resolve(
"uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" )
smgr = ctx.ServiceManager
desktop = smgr.createInstanceWithContext( "com.sun.star.frame.Desktop",ctx)

oDisp = smgr.createInstanceWithContext(
"com.sun.star.frame.DispatchHelper",ctx)
macroURL = "macro:///Standard.Module1.SaveAsExcel97(" + sys.argv[1] +")"
oDisp.executeDispatch(desktop, macroURL, "", 0, ()),

the python script is called from vw (shell script), with location of
source odf document as argument.

On Mon, Jun 22, 2009 at 7:58 PM, Nowak, Helge<[hidden email]> wrote:

> the request came from a client
> he actually wants to use OpenOffice as an alternative to MS Office (Word and
> Excel). I. e. he needs to call and open OpenOffice, feed in data and
> kick-off functions/macros to generate documents, charts, etc. The things you
> do on Windows usually with OLE.
>
> But OLE is not an option since it should be cross platform (Windows and
> Linux).
>
> Going via Java or Python has (probably) a performance disadvatange and is
> complicating the architecture even more.
>
> It seems to me that creating a Smalltalk language binding and bridge/adapter
> for the UNO architecture would be best. Did anyone try that one?
>
> Or could one use Binary UNO SAL
> (http://wiki.services.openoffice.org/wiki/Porting/Modules/SAL) with DLC&C?
>
> TIA
> Helge
> ________________________________
> Von: [hidden email] [mailto:[hidden email]] Im Auftrag
> von Annick Fron
> Gesendet: Montag, 22. Juni 2009 16:04
> An: vwnc NC
> Betreff: Re: [vwnc] OpenOffice Connect?
>
> I have used UNO with Java, which is a kind of automation with interfaces.
> There are a good number of examples under :
> http://udk.openoffice.org/
> It requires opening a socket in Openoffice and enabling the java interpret.
> It's quite slow, but works well.
> Annick Fron
> Le 22 juin 09 à 11:44, Alexander Augustin a écrit :
>
> Hello,
> I checked whether it is possible to access OpenOffice using COM Connect
> Automation.
> There is a class registered as “com.sun.star.ServiceManager” which could be
> used as starting point.
> Currently there are some problems which prevent this.
> Some details for interested people:
> First, OpenOffice does not seem to provide a type library. So the Automation
> Browser is unable to provide any information about OpenOffice.
> So developers would have to know which methods to call and which parameters
> to pass.
> Also, they would have to specify to use the newVariantPolicy in the
> DispatchDriver in order to prevent VisualWorks from trying to look up type
> information.
> In addition to this, OpenOffice automation objects (e.g. the ServiceManager)
> do not seem to implement the IDispatch interface completely,
> which causes additional problems.
> I am working at the described problems to make it nevertheless possible to
> access OpenOffice (and maybe other software with similar issues)
> using COM Connect.
> Best regards,
> Alexander Augustin
> Alexander Augustin (Dipl.-Informatiker),
> Email: [hidden email] ,
> Tel: +49-3496-214329, Fax: +49-3496-214712
> Georg Heeg eK, Köthen
> Handelsregister: Amtsgericht Dortmund A 12812
> ________________________________
> Von: [hidden email] [mailto:[hidden email]] Im Auftrag
> von reinier van oosten
> Gesendet: Samstag, 20. Juni 2009 20:37
> An: Nowak, Helge
> Cc: [hidden email]
> Betreff: Re: [vwnc] OpenOffice Connect?
> Hi Helge,
> What is it exactly that you want. Both reading and writing, interacting, or
> just creating a document (including macros) that can be read by OpenOffice.
> I have a very simple creator of MS Office 2004 xml format. Both openoffice
> and ms office can read this format.
> Reinier van Oosten
> tel: 079-3437073
> gsm: 0651335993
> email: [hidden email]
> skype: rvoosten
>
> On Jun 19, 2009, at 4:59 PM, Nowak, Helge wrote:
>
> Dear all,
>
> has anybody written an interface to OpenOffice? I checked the Public Store
> but couldn't find anything.
>
> TIA
> Helge
>
> **************************************************************
> Helge K. Nowak
> Technical Account Manager Cincom Smalltalk
> Cincom Systems GmbH & Co. oHG
> Am Kronberger Hang 4
> D-65824 Schwalbach/Ts.
> Tel.: +49-(0)89-89664494
> Mobil: +49-(0)172-7400402
> Fax: +49-(0)89-89664495
> Email: mailto:[hidden email]
> Web: http://smalltalk.cincom.com
>
> Alles über Cincom Smalltalk:
> http://smalltalk.cincom.com
>
> Ein Standpunkt ist ein geistiger Horizont vom Radius Null.
> -- Albert Einstein
>
> Geschäftsführer/Managing Directors: Thomas M. Nies, Gerald L. Shawhan
> oHG mit Sitz/based in Schwalbach/Ts. (Amtsgericht Königstein/Ts. HRA 2653)
> Pers. haftender Gesellschafter/Partner liable to unlimited extent:
> Cincom Systems Verwaltungsgesellschaft mbH (Amtsgericht Königstein/Ts. HRB
> 5069)
> **************************************************************
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>



--
AG5 - Product manager

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc