
Ich möchte in Calc ein Textfeld auslesen:
Code: Alles auswählen
def read_textfield():
oDoc = XSCRIPTCONTEXT.getDocument()
oController = oDoc.getCurrentController()
oSheet = oDoc.Sheets[0]
oForm = oSheet.forms.getByIndex(0)
oNumField1 = oForm.getByName("Textfeld 1")
oView = oController.getControl(oNumField1)
nValue = oView.Model.string
print(nValue)
Wie muss die Zeile richtig lauten?AttributError: forms
Danke
Stefan