How to use the DDE function in the Calc component to get the text content of a Word document?
I successfully get the table data from the writer using the DDE function in calc, but I don’t know how to get the text content from the writer.
In CALC ,I can get the table data from Word document using the following formula:
=DDE(“soffice”,“F:\TEST.docx”,“Table1”)
But I don’t know how to write the third parameter to get the text content of the Word document.
Why are you using DOCX and not ODS?
https://wiki.documentfoundation.org/Faq/General/118#Edit_different_file_formats_in_LibreOffice
Obviously Calc uses only arrays (and not single cell addresses) when copying a DDE from DOCX document to ODS document. See the curly brackets before and after the DDE formula. This can’t be broken into parts if you try this (to set an address of a single cell).
.
Backwards it is easier to transfer DDE values from spreadsheet to text document…
Brother, my current question is, what is the writing method for this third parameter?
In the table, I know it’s ’ Table. Cell ’
What is used in Word?
Is there a reference for the writing method of this third parameter??
The third argument of DDE function, named “Range”, is actually server-specific “item” of DDE protocol. And because it’s server-specific, when you address a Writer document, it depends on what Writer accepts as “item”. And the latter accepts one of three possible things: bookmark names, section names, and table names. That’s all.
If you need, you may create a section or a bookmark, to get content outside of a table.
There is a question involved here:
If I didn’t use bookmark names, section names, and table names in the writer,
then I wouldn’t know the name of that reference.
How to write the third parameter in this situation, how to reference and obtain the content inside?
Will there be default set related reference variables in the writer?
What is unclear about
accepts one of three possible things: bookmark names, section names, and table names. That’s all.
If you use neither then there’s no item to address.
I think the program should set a default variable name as a reference object for text content or tables.
In most cases, external Word documents will not be set up for you in advance. If there is a default name at this time, it will be easy to obtain any text content!
I’m not sure if the development team will consider adding this feature.
Defaulting to what? The entire document content?
Yes, a default variable can refer to the text content of the entire document.
Similar to Document. Contents or Paragraphs [0]
You may want to submit a request for enhancement (RFE) (set Importance Severity to enhancement).