Home > 備忘録 > libreoffice の macro(basic) > Cell内の文字位置( 96 )
sub Demo
Dim sheet,cell As Object
Dim kei As Long
sheet=ThisComponent.CurrentController.Activesheet
cell=sheet.getCellRangeByName("D3")
cell.HoriJustify=com.sun.star.table.CellHoriJustify.STANDARD
cell.HoriJustify=com.sun.star.table.CellHoriJustify.LEFT
cell.HoriJustify=com.sun.star.table.CellHoriJustify.CENTER
cell.HoriJustify=com.sun.star.table.CellHoriJustify.RIGHT
cell.HoriJustify=com.sun.star.table.CellHoriJustify.BLOCK
cell.HoriJustify=com.sun.star.table.CellHoriJustify.REPEAT
end subsub Demo
Dim sheet,cell As Object
Dim kei As Long
sheet=ThisComponent.CurrentController.Activesheet
cell=sheet.getCellRangeByName("D3")
cell.VertJustify=com.sun.star.table.CellVertJustify.STANDARD
cell.VertJustify=com.sun.star.table.CellVertJustify.TOP
cell.VertJustify=com.sun.star.table.CellVertJustify.CENTER
cell.VertJustify=com.sun.star.table.CellVertJustify.BOTTOM
end subsub Demo
Dim sheetName(),msg as String
Dim i as Long
msg=""
sheetName=ThisComponent.Sheets.getElementNames()
for i=0 to UBound(sheetName)
msg=msg & sheetName(i) & Chr$(10)
next i
MsgBox msg
end sub