Using custom functions should be the most flexible solution for defining constants. In the following case, I assume that the current Calc spreadsheet file is called test1.ods. Replace it with the real file name in the following steps:
Function Var1()
Var1 = "foo"
End Function
Function Var2()
Var2 = 42
End Function
IDE :

- CTRL + S .
, (: , ). . LO Calc test1.ods, :
=Var1()
LO Var1(), . , . :
=Var2() * 2
LO 84.