Translations:Macros/Python Guide/My first macro/10/en

From The Document Foundation Wiki
Jump to navigation Jump to search

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>