Question

There's a function called LEN in OpenOffice Calc, which calculates a number of characters in a cell. Unfortunately, a list of Calc functions in OpenOffice Writer is very limited. Is there something similar that I can do in the table cells of OpenOffice Writer?

(Basically, I have dozens of tables in the document. The goal is to fill the cells with text that has to have specific number of characters. Doing Tools / Word Count every few minutes is very cumbersome. I'd like to have a separate column, in which every cell shows a number of characters written in the corresponding cells.)

Was it helpful?

Solution

There is no direct provision for formulas in table cells in OpenOffice Writer.

What you can do is make the table in OpenOffice Calc and embed it in the Writer document. You should be able to edit it from within Writer too. Look at the Insert | Object ... Menu options (with Create new) for inserting an embedded OLE Object. Inserting an OpenOffice Spreadsheet, etc., is called-out as a special case in the "Insert OLE Object" dialog.

Further observations:

You will need to fuss a bit to have it appear as just the table with no row and column titles, etc., and you might want to protect it in the final document unless you want recipients to be able to alter it. You'll need to use other features of Calc to format cell borders, etc., and control what is shown in the spreadsheet.

There might be some feature of a direct OpenOffice Writer table that can't be obtained the way you want. (E.g., cross-references and bookmarks probably won't work between the embedded object and the containing Writer document. There might be some complex formatting of a Writer table cell that has to be done differently in Calc.)

(Technically, the ODF specification permits formulas in table cells directly, but it would be non-trivial to implement that and all implementations would need to do it in an interoperable way. A significant part of the OpenFormula definition depends on there being a workbook within which the formula occurs. There are features that formulas can depend upon that are not provided in the ODF Text Document schema. The embedded object case, although indirect, is commonly supported among the OpenOffice-lineage implementations. It is also what OLE was invented for.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top