Libreoffice Calc Basic How to append 2 decimal places by code

566 Views Asked by At

Declaration

Dim currDoc As Object
Dim currSheet As Object
Dim cell As Object  
currDoc = ThisComponent
currSheet = currDoc.sheets(0)

Logic

cell.Formula = cDbl(cell.Value)

Desired Output
100,00

1

There are 1 best solutions below

0
TorbenIT On BEST ANSWER

based on @JohnSUN 's comment: Just add one line for your cell to be formatted:

Cell.NumberFormat = 2 

Table for all Numberformats on page 189