doc = XSCRIPTCONTEXT.getDocument() sheet = doc.Sheets[0] doc.getCurrentController().setActiveSheet(sheet)