doc = XSCRIPTCONTEXT.getDocument() sheet = doc.getCurrentController().getActiveSheet() msgbox(sheet.Name)