Hi,
I have a text document with a table inside. I need to fetch some data from this table within the text of this document. It has to be linked so that when I modify the table, changes spread also to the text.
How can I do this?
Please, reword your question (= modify it; don’t use a comment) to better describe the use case. Provide an example, ideally both a literary description and a sample file. Explain the final goal as an author’s intent. Don’t try to give details on your present solution as you could have followed the wrong track.
Is the data in the table text or numbers? Is it created in Writer or in Calc, the spreadsheet component?
How many rows/columns in the table? Do you want to retrieve only a handful of cell contents? Or is this a procedure for handling all rows, each at a time?
The document is a company contract, thus I cannot share it. Basically, there is a table with the quotation for a project along with the contract for the same project. Some contractual clauses need to include figures present in the quotation. To avoid mistakes, I’d like to link the values in the contract to those in the quotation.
For now, I only need to retrieve the value of 2 cells; each of them are used several times in the rest of the document.
If it is only a matter of a few cells, just define a reference on the data with Insert
>Cross-Reference
, Set reference variant.
Where you want to “quote” the data, Insert
>Cross-reference
, Insert Reference variant with Referenced text property.
You didn’t mention your OS name, LO version and save format. Note that the suggestion above is reliable and stable only if you save .odt. Saving .doc(x) incurs conversions on save and reload which often change the semantics of the intended effect. You’re warned.
thanks ajlittoz!
exactly what I was looking for.
After editing the reference text, I need to update fields (F9) to see the changes.
Ctrl+F10 also works.