The Linux Page

The *** expression is faulty *** Open Office Error in Tables

Today I got to work on a document including a few expressions (multiplications and a sum.) That was in a table that looked something like this:

Designation Price Quantity Total
Stuff #1 $10 3 $30
Thing #2 $20 0.5 $10
Other #3 $30 4 $120
Grand Total: $160

In my case, I made a copy/paste of such a table and I went ahead and deleted Thing #2 and Other #3 because I did not need 3 lines. All of a sudden the Grand Total said:

*** expression is faulty ***

Sure enough, when placing my mouse over the text, I would be shown the actual expression, and it looked faulty alright:


Now... How do you fix that expression?

Well, you have to open the expression editor using the View menu. It's actually called Formula and it is found in the Toolbars sub-menu:

Screenshot showing where the Formula toolbar is found in Open Office Writer

The forumla bar will allow you to edit your formula. Make sure to open it when with the focus in the cell of the table you want to edit the formula from.

This toolbar allows you to edit that one specific cell. If you click in other cells of the table, then it will print the reference in your toolbar. Partical instead of having to guess what each cell reference is.

Once you are done with the formula, hit Enter. It gets saved and you can continue your normal editing. You have to reopen the Formula toolbar each time you want to enter a new formula in a cell.

In case you made a mistake (say you did not select the correct cell the first time you enter the formula mode) you can hit your Escape key to cancel everything and close the formula bar.

The supported expressions, according to the OpenOffice documentation are all those found in Calc. Although don't be surprised if some advance features can't be replicated in a simple OpenOffice table. If you really need features that are not readily available in Writer tables, you could also connect with Calc by inserting a sheet in your Writer document.