Using an OpenOffice Spreadsheet instead of Excel

Using (or providing) components based on the "Win32" framework
Post Reply
PhilGray
Posts: 50
Joined: Sat Mar 13, 2010 7:55 pm

Using an OpenOffice Spreadsheet instead of Excel

Post by PhilGray »

Short question:
has anyone tried linking to an OpenOffice Spreadsheet yet, rather than Excel ?
I haven't tried it myself yet, and was hoping someone may have tried it already !
e.g. a few leads/hints before I start !
Thanks in advance
Phil
User avatar
Dick Bowman
Posts: 235
Joined: Thu Jun 18, 2009 4:55 pm
Contact:

Re: Using an OpenOffice Spreadsheet instead of Excel

Post by Dick Bowman »

For what it's worth...

Some time ago I tried accessing the OpenOffice.org database from APL without success; process was to get some hints out of the "code snippets" in their support forum, try it out in VB and - if that was successful - translate to APL. But I couldn't get the VB to work and got a "me neither" response when I asked in the forums. Trouble is that the coding of OpenOffice.org is from the Java cult - and there didn't seem to be much in the way of bridges between there and .Net. Maybe it's different now.

I suspect that a more viable route may be to have the spreadsheet in control, calling/using .Net assemblies written in APL. I'd have a poke around in the OpenOffice.org forums.

I think we all need to write up whatever successes we have with APL interopearability, to save ourselves effort in the future. I certainly find this stuff alien and quite unpleasant to deal with - and can't get away from a sense that if I'm spending 80% of my time working out how to write the exact same calls as a VB programmer maybe I should just jack it all in and write VB instead (and that is as likely as my Olympic Pole Vault gold medal).
Visit http://apl.dickbowman.com to read more from Dick Bowman
PhilGray
Posts: 50
Joined: Sat Mar 13, 2010 7:55 pm

Re: Using an OpenOffice Spreadsheet instead of Excel

Post by PhilGray »

Dick Bowman wrote:I think we all need to write up whatever successes we have with APL interopearability, to save ourselves effort in the future. I certainly find this stuff alien and quite unpleasant to deal with - and can't get away from a sense that if I'm spending 80% of my time working out how to write the exact same calls as a VB programmer maybe I should just jack it all in and write VB instead (and that is as likely as my Olympic Pole Vault gold medal).


How right you are !
BTW, has the .NET functionality now become a "standard part of" the Microsoft OS's ?
i.e. Vista, Win7 + futures OS's .
In XP , one has to "specifically" install it .

As to using the IE Browser within APL, I have yet to see some concrete examples of using the Properties and Methods ( "PutProperty" etc. ) provided by IE, apart from the simple ones like .Busy .Navigate. Home .Refresh etc. etc.

On OpenOffice "bridges" : maybe things will (hopefully) change with Sun now is running the show.
User avatar
Morten|Dyalog
Posts: 460
Joined: Tue Sep 09, 2008 3:52 pm

Re: Using an OpenOffice Spreadsheet instead of Excel

Post by Morten|Dyalog »

Yes, .NET is a standard part of recent releases of Windows. But if you are aiming to automate OpenOffice products, I suspect that will be using the old COM interface rather than .NET.

I don't know anyone who has successfully used OpenOffice from APL, but it should work if the products implement a standard automation interface. I have no idea what priority the OpenOffice team gives to supporting this well; I have a suspicion that most people who care about "seamless integration and automation" also want lots of working code samples and components that they can lift off the internet, and have steered clear of OpenOffice. I could be wrong, but I would not be surprised if these products are mostly used by people who primarly need "stand alone" word processing or spreadsheet functionality.

If you have some examples in VB (or any other language), write to me direct and I'll see whether I can help.
PhilGray
Posts: 50
Joined: Sat Mar 13, 2010 7:55 pm

Re: Using an OpenOffice Spreadsheet instead of Excel

Post by PhilGray »

Hi Morten,

I've been looking at this :
http://codesnippets.services.openoffice ... ilter.snip

I haven't yet found a basic reference manual , am still looking.
Cheers
phil

PS: code snippets exist for : Java, OOBasic, ooRexx
User avatar
Dick Bowman
Posts: 235
Joined: Thu Jun 18, 2009 4:55 pm
Contact:

Re: Using an OpenOffice Spreadsheet instead of Excel

Post by Dick Bowman »

As I hinted earlier, the problem with connecting with OpenOffice.org programmatically is that it is part of the Java cult - which does not seem to very much welcome outsiders.

There seems (or at least when I was looking at it) to be some programmatic activity (the code snippets that Phil found) - but it does seem to be a little introspective. I think if we found documented successes from people using VB/C/Chash/etc we'd be on our way...
Visit http://apl.dickbowman.com to read more from Dick Bowman
User avatar
kai
Posts: 141
Joined: Thu Jun 18, 2009 5:10 pm
Location: Hillesheim / Germany

Re: Using an OpenOffice Spreadsheet instead of Excel

Post by kai »

This looks promising:

http://api.openoffice.org/

Kai
Vince|Dyalog
Posts: 439
Joined: Wed Oct 01, 2008 9:39 am

Re: Using an OpenOffice Spreadsheet instead of Excel

Post by Vince|Dyalog »

Hello,

Update: Today, I've tried OpenOffice 4.1.3 and have had it open OpenOffice Calc with the following:

      'op'⎕WC'oleclient' 'com.sun.star.ServiceManager'
odesk dname←op.createInstance⊂'com.sun.star.frame.Desktop'
calc arg1 arg2 arg3 arg4←odesk.loadComponentFromURL('private:factory/scalc' '_blank' 0 ⍬)


Regards,

Vince
Post Reply