Hi Davide,

On Tue, Jul 26, 2005 at 17:40:39 +0200, Davide Dozza wrote:

> >>We've a SAS application which populates an Excel document using DDE.
> > 
> > 
> > How is that achieved on the Excel side?
> 
> Is it activate from the server side? I figured out it's a push procedure
> toward excel not a pull from SAS.

Ah, then it's the other way around than I thought, so my previous mail
wasn't of real help.. you're using Excel as a DDE server, OpenOffice.org
doesn't serve DDE.

> Anyway, here is a piece of code:
> 
> submit
>   filename cmds dde 'Excel|system';
>   data _null_ ;
>     file cmds;
>     select = '[select("' || "&rows.1&cols.1:&rows.&nrows1&cols.&ncols"
> || '")]';
>     put select ;
>     put "[column.width(,,,3)]";
>     put select ;
>     put "[app.activate()]" ;
>   run ;
> endsubmit

Yes, the SYSTEM topic in "filename cmds dde 'Excel|system';" lets you
execute commands in Excel. In OOo you'd have to use UNO to connect to
the application and use the API to push your values.

Since you're under Windows you might be interested in OOo's Automation
capabilities, see
http://udk.openoffice.org/common/man/tutorial/office_automation.html
and the example of
http://api.openoffice.org/docs/DevelopersGuide/ProfUNO/ProfUNO.htm#1+4+4+Automation+Bridge
is almost what you need..

There is also an OOoForum article
http://www.oooforum.org/forum/viewtopic.phtml?t=9815
that provides some background and gives examples in various programming
languages.

  Eike

-- 
 OOo/SO Calc core developer. Number formatter bedevilled I18N transpositionizer.
 GnuPG key 0x293C05FD:  997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to