マクロ/Pythonガイド/Calc/Calc範囲
< Macros | Python Guide | Calc
TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate
⇐ Return to Python Guide, Calc
範囲
CAUTION: Copy or import function msgbox
from Useful functions
Get cell by name
doc = XSCRIPTCONTEXT.getDocument()
sheet = doc.CurrentController.ActiveSheet
cell = sheet['A1']
msgbox(cell.AbsoluteName)
Get cell by position
doc = XSCRIPTCONTEXT.getDocument()
sheet = doc.CurrentController.ActiveSheet
# Cell C6
row = 5
column = 2
cell = sheet[row,column]
msgbox(cell.AbsoluteName)