Translations:Macros/Python Guide/My first macro/10/en
def my_first_macro_calc():
doc = XSCRIPTCONTEXT.getDocument() cell = doc.Sheets[0]['A1'] # com.sun.star.sheet.XSpreadsheetDocument cell.setString('Hello World in Python in Calc') return
</syntaxhighlight>