von Stephan » So, 27.12.2015 16:52
z.B. erstelle per Makro ein Tabellenblatt das die Bereichsnamen und Inhalte auflistet:
Code: Alles auswählen
Sub Main
ThisComponent.Sheets.InsertNewByName("Bereiche",0)
tmp = ThisComponent.NamedRanges
blatt = ThisComponent.Sheets.getByName("Bereiche")
blatt.getCellByPosition(0,0).String = "Name"
blatt.getCellByPosition(1,0).String = "Inhalt"
For i = 1 to tmp.Count
blatt.getCellByPosition(0,i).String = tmp(i-1).Name
blatt.getCellByPosition(1,i).String = tmp(i-1).Content
Next i
End Sub
Gruß
Stephan
z.B. erstelle per Makro ein Tabellenblatt das die Bereichsnamen und Inhalte auflistet:
[code]Sub Main
ThisComponent.Sheets.InsertNewByName("Bereiche",0)
tmp = ThisComponent.NamedRanges
blatt = ThisComponent.Sheets.getByName("Bereiche")
blatt.getCellByPosition(0,0).String = "Name"
blatt.getCellByPosition(1,0).String = "Inhalt"
For i = 1 to tmp.Count
blatt.getCellByPosition(0,i).String = tmp(i-1).Name
blatt.getCellByPosition(1,i).String = tmp(i-1).Content
Next i
End Sub
[/code]
Gruß
Stephan