/* get the desktop (an Xdesktop object) */
oDesktop =UNO.createDesktop()
xComponentLoader = oDesktop~XDesktop~XComponentLoader--get componentLoader interface/* open a blank calc file */
url ="private:factory/scalc"
xCalcComponent = xComponentLoader~loadComponentFromURL(url,"_blank", 0,.UNO~noProps)/* get first sheet in spreadsheet */
xDocument = xCalcComponent~XSpreadSheetDocument
xSheet = xDocument~getSheets~XIndexAccess~getByIndex(0)~XSpreadSheet
xCell= xSheet~getCellByPosition(1, 1)
xCellAddress = xCell~XCellAddressable~getCellAddressCALL UNO.loadClass"com.sun.star.table.CellAddress"/*get annotations*/
xAnnotation = xSheet~XSheetAnnotationsSupplier~getAnnotations
xAnnotation~insertNew(xCellAddress,"Rexx was here to make a annotation")/*get annotations anchor and set visible*/
xAnnotAnchor = xCell~XSheetAnnotationAnchor
xAnnot =xAnnotAnchor~getAnnotation
xAnnot~setIsVisible(.true)::requires UNO.cls-- get UNO support