1

In my LibreOffice Calc spreadsheet, I have a block with a line for each data array (with block:tbs-row) one of the values is a date, which is sometimes empty With [blk1.DT_FIN_ABONNEMENT;noerr;frm=dd/mm/yyyy;ope=tbs:string], I have a text value when not empty, and an empty cell when the value is empty.

With [blk1.DT_FIN_ABONNEMENT;noerr;frm=dd/mm/yyyy;ope=tbs:date], I have a date value when not empty, and '30/12/1899' when the value is empty. I would like to have an empty cell when there is no value.

I tried frm='dd/mm/yyyy|||', frm='dd/mm/yyyy||| ', frm='dd/mm/yyyy|||NULL', frm='dd/mm/yyyy|||#N/A' and the result is the same

and [blk1.DT_FIN_ABONNEMENT;noerr;ope=tbs:string;mok:magnet=tbs:p] [blk1.DT_FIN_ABONNEMENT;noerr;frm=dd/mm/yyyy;ope=tbs:date;magnet=tbs:p]

breaks the template

Can anyone give me a clue ? Thanks

veroniqueg
  • 41
  • 6

1 Answers1

1

LibreOffice (and OpenOffice) has no NULL value for dates. AS soon as a cell is typed as date, then it tries to convert it to a date. If a date value is empty then it applies the zero date value, which is set for the Workbook at the option window : Tools/Options/LivreOffice Calc/Calculation. As you should see, the default zero date value is usually set to 1899-12-30.

Unfortunately, OpenTBS cannot deals yet with this LibreOffice behavior. (OpenTBS current version is 1.10.0).

A cannot see any simple way to make a workaround.

  • Since you use ope=tbs:date, then the cell is typed as date, and thus LibreOffice assumes it is zero date value when the inner value is empty. By the way, when you use ope=tbs:date, then your parameter frm is overwritten by OpenTBS.

  • Since you don't use ope=tbs:something, then the cell is typed as string and you cannot use the cell as a date...

Skrol29
  • 5,402
  • 1
  • 20
  • 25