def my_first_macro_calc():
doc = XSCRIPTCONTEXT.getDocument() cell = doc.Sheets[0]['A1'] cell.setString('Hello World in Python in Calc') return
</syntaxhighlight>