Documentation/Calc Functions/DDE

From The Document Foundation Wiki
Jump to navigation Jump to search

Function name:





Returns the result of a DDE-based link. If the contents of the linked range or section changes, the returned value will also change.


DDE("Server"; "File"; "Range"[; Mode])


Returns the appropriate data from a DDE request.


Server is the name of a server application or a reference to the cell containing that name. LibreOffice applications have the server name "soffice".

File is the complete filename or a reference to the cell containing that name, including path specification.

Range is the area containing the data to be evaluated. It can be a named area or reference to a range of cells.

Mode controls the method by which the DDE server converts its data into numbers. It can be either 0, 1 or 2.

Mode Effect
0 or missing Number format from the "Default" cell style
1 Data are always interpreted in the standard format for US English
2 Data are retrieved as text; no conversion to numbers
  • If Mode is a non-integer real number then it is truncated to an integer.
  • If after truncation, Mode is not 0,1 or 2 then the function returns an error value.
  • If either File, Server or Range is not valid value then the function returns #N/A error.

Additional details:

  • You must reload the spreadsheet or choose Edit > Links to see the updated links. Cross-platform links, for example from a LibreOffice installation running on a Windows machine to a document created on a Linux machine, are not allowed.


Formula Description
=DDE("soffice";"c:\office\document\data1.ods";"sheet1.A1") The function reads the contents of cell A1 in sheet1 of the LibreOffice Calc spreadsheet data1.ods.
=DDE("soffice";"c:\office\document\motto.odt";"Today's motto") The function returns a motto in the cell containing this formula. First, you must enter a line in the motto.odt document containing the motto text and define it as the first line of a section named Today's Motto (in LibreOffice Writer under Insert > Section). If the motto is modified (and saved) in the LibreOffice Writer document, the motto is updated in all LibreOffice Calc cells in which this DDE link is defined.

Related LibreOffice functions:


ODF standard:

Section 6.11.2, part 2

Equivalent Excel functions: