I get "Expression is faulty" in a table of Writer.

strong text Formula =/. Both cells may be or may be not 0. In second case I want a blank value. How can I do it?

Write your values in A1 and B1. Write in C1 =<B1>/<A1> and Return.
In my opinion, calculations in a Writer table do not really make sense.

Alternate:
You can also insert a Calc table in Writer for larger calculations.

We open Writer. Now we insert an existing Calc table. In the menu, we choose Insert▸Object▸OLE Object ... In the “Insert OLE Object” dialog box, select “LibreOffice 6.0 Spreadsheet Document” and “Create from File”. In the next selection we click, Search .... In the dialog box “Open” we mark the file for example “Table ODS.ods” and click on Open. We put a mark on “Link to file”. We click on OK. Now the Calc table has been inserted as an object in the Writer document. Double-clicking on the Calc table object opens the Calc edit view. The table can now be edited just like in Calc. Finally we should save the document. We give the name, e.g. “Delivery note with Calc table”. We click Save.

View Calc-table:

image description

Inserted view in Writer:

image description

After double-clicking:

I agree. Tables in Writer are not meant for calculations. They accept simple arithmetic which is enough for totalling. If your needs go beyond this simple arithmetic, such as sophisticated formulaes or formatting – you mentioned hiding division by zero --, insert a Calc spreadsheet and do all your maths/formatting in Calc where you have powerful tools. Don"t hesitate, Writer and Calc are components of the same suite.

Thank you for an answer. But I do very simple calculations! All I need is calc percent value A from B. I have made template.odt file with few tables which are filled from a delphi program. I can calculate it there. It’s very bad that there is’not function in Writer such as @if.