 | OO-Snippets: ColumnAndRowAttributesCommons| Keywords | |
|---|
| Language | ooRexx |
|---|
| Application | Calc |
|---|
| Authors | Michael Hinz
|
|---|
| Supported Versions | 2.0.x |
|---|
| Supported OS | Win32 |
|---|
| Question | How can i change column and cell attributes(change color and make it invisible)
|
|---|
| Answer | |
|---|
oDesktop = UNO.createDesktop()
xComponentLoader = oDesktop~XDesktop~XComponentLoader
url = "private:factory/scalc"
xCalcComponent = xComponentLoader~loadComponentFromURL(url, "_blank", 0, .UNO~noProps)
xDocument = xCalcComponent~XSpreadSheetDocument
xSheet = xDocument~getSheets~XIndexAccess~getByIndex(0)~XSpreadSheet
CALL UNO.setCell xSheet, 0, 4, "This row will be deleted!"
xColumnRowRange = xSheet~xColumnRowRange~getColumns()
xColumn = xColumnRowRange~getByIndex(3)
xColumnRowRange = xSheet~xColumnRowRange~getRows()
xRow = xColumnRowRange~getByIndex(4)
CALL syssleep 3
xColumn~xPropertySet~setPropertyValue("CellBackColor", box("int", "006666"x ~c2d))
CALL syssleep 4
xRow~xPropertySet~setPropertyValue("IsVisible", Boolean (false))
::requires UNO.cls
|
|