Skip to main content

Hi Unifacers

with U9/U10 we succesfully read and write Microsoft Excel cells using the (very old) DDE method; so basically we open a Microsoft Excel file, and while open in the background doing the following:

$50 = "Excel"

$51 = "c:\\temp\\filename.xls"

$52 = "R1C1"

perform "UDDEREQUEST"

and we get succesfully in $53 the value of the cell

is there a way to do the same with LibreOffice Calc instead of Microsoft Excel? I googled something and just found that I should replace my instructions like this:

$50 = "soffice"

$51 = "c:\\temp\\filename.xls"                 (or filename.ods)

$52 = "nameofthesheet.C1"

but it does not work.. anyone tryed to do something similar? or you left alone DDE and went to other methods like OLE or others?

a working example would be great

thank you

Simone



------------------------------
Simone Pecchenino
Labinf Sistemi Srl
IT
------------------------------

Hi Unifacers

with U9/U10 we succesfully read and write Microsoft Excel cells using the (very old) DDE method; so basically we open a Microsoft Excel file, and while open in the background doing the following:

$50 = "Excel"

$51 = "c:\\temp\\filename.xls"

$52 = "R1C1"

perform "UDDEREQUEST"

and we get succesfully in $53 the value of the cell

is there a way to do the same with LibreOffice Calc instead of Microsoft Excel? I googled something and just found that I should replace my instructions like this:

$50 = "soffice"

$51 = "c:\\temp\\filename.xls"                 (or filename.ods)

$52 = "nameofthesheet.C1"

but it does not work.. anyone tryed to do something similar? or you left alone DDE and went to other methods like OLE or others?

a working example would be great

thank you

Simone



------------------------------
Simone Pecchenino
Labinf Sistemi Srl
IT
------------------------------

Ciao Simone,

this is a working DDE link in a cell of an OpenOffice Calc spreadsheet to link a cell in an Excel spreadsheet via DDE:

=DDE("Excel";"C:\\Users\\sandiglianog\\Documents\\[Cartel1.xlsx]Foglio1";"R2C1")

In this case Calc is acting as requester and Excel is answering to the request; that link works only if the Excel file is opened when Calc file is updated.

I understand you need the reverse direction with Uniface acting as requester and Calc answering to the request but I was NOT able to have it working.

Hope it helps...

Gianni



------------------------------
Gianni Sandigliano
IT
------------------------------


Ciao Simone,

this is a working DDE link in a cell of an OpenOffice Calc spreadsheet to link a cell in an Excel spreadsheet via DDE:

=DDE("Excel";"C:\\Users\\sandiglianog\\Documents\\[Cartel1.xlsx]Foglio1";"R2C1")

In this case Calc is acting as requester and Excel is answering to the request; that link works only if the Excel file is opened when Calc file is updated.

I understand you need the reverse direction with Uniface acting as requester and Calc answering to the request but I was NOT able to have it working.

Hope it helps...

Gianni



------------------------------
Gianni Sandigliano
IT
------------------------------

Ciao Simone,

I've just found a working example on the web... three items to be noted:

1) The correct format is: =DDE("soffice";"FullFilename";"'SheetName'.a1"). Please note those simple ticks surrounding sheet name.
2) Automatic update via DDE/external links is disabled by default on LibreOffice for security reasons
3) The data source spreadsheet MUST be open to guarantee the update

I've used latest LibreOffice 24.2 to test it.

Gianni



------------------------------
Gianni Sandigliano
IT
------------------------------


Ciao Simone,

I've just found a working example on the web... three items to be noted:

1) The correct format is: =DDE("soffice";"FullFilename";"'SheetName'.a1"). Please note those simple ticks surrounding sheet name.
2) Automatic update via DDE/external links is disabled by default on LibreOffice for security reasons
3) The data source spreadsheet MUST be open to guarantee the update

I've used latest LibreOffice 24.2 to test it.

Gianni



------------------------------
Gianni Sandigliano
IT
------------------------------

thank you Gianni!

I'm trying this asap

so writing is disabled by default and can't be enabled, or can it be?

thank you

Simone



------------------------------
Simone Pecchenino
Labinf Sistemi Srl
IT
------------------------------

thank you Gianni!

I'm trying this asap

so writing is disabled by default and can't be enabled, or can it be?

thank you

Simone



------------------------------
Simone Pecchenino
Labinf Sistemi Srl
IT
------------------------------

Ciao Simone,

I have currently NO answer to your question... probably there is a checkbox somewhere to be ticked/unticked... you should check by yourself into documentation.

Gianni



------------------------------
Gianni Sandigliano
IT
------------------------------