
Calc; Zell-Gültigkeit
Calc; Zell-Gültigkeit
Hallo,
gibt es einen Befehl wie "Cellvalidity", mit dem ich die Gültigkeit einer Calc-Zelle aus bestimmte Werte festlegen kann (per Makro)?
Danke im Voraus
gibt es einen Befehl wie "Cellvalidity", mit dem ich die Gültigkeit einer Calc-Zelle aus bestimmte Werte festlegen kann (per Makro)?
Danke im Voraus
Re: Calc; Zell-Gültigkeit
Hallo
Ja den gibts, und das übliche Verfahren das herauszufinden ist…:
Ja den gibts, und das übliche Verfahren das herauszufinden ist…:
- →Daten→Gültigkeit… manuell festlegen
→Extras→Addons→Mri-Selection… →→Validation
LO25.2.x.y debian 13(trixie) auf Raspberry5 8GB (64bit)
LO25.8.x.y flatpak debian 13(trixie) auf Raspberry5 8GB (64bit)
LO25.8.x.y flatpak debian 13(trixie) auf Raspberry5 8GB (64bit)
Re: Calc; Zell-Gültigkeit
Danke, das ist ein interessanter Befehl, der mir bisher noch gar nicht aufgefallen ist.
Aber so richtig weiter hilft er mir nicht.
Ich habe über Daten -> Gültigkeit -> Liste festgelegt, dass die Zelle nur die Werte 0 oder 100 annehmen darf.
Unter Validation steht dann .beans.XPropertySet
Was sagt mir das?
Aber so richtig weiter hilft er mir nicht.
Ich habe über Daten -> Gültigkeit -> Liste festgelegt, dass die Zelle nur die Werte 0 oder 100 annehmen darf.
Unter Validation steht dann .beans.XPropertySet
Was sagt mir das?
Re: Calc; Zell-Gültigkeit
Hallo
Das sagt dir "mach mal Doppekklick auf `Validation` "
Das sagt dir "mach mal Doppekklick auf `Validation` "
LO25.2.x.y debian 13(trixie) auf Raspberry5 8GB (64bit)
LO25.8.x.y flatpak debian 13(trixie) auf Raspberry5 8GB (64bit)
LO25.8.x.y flatpak debian 13(trixie) auf Raspberry5 8GB (64bit)
Re: Calc; Zell-Gültigkeit
Danke, langsam komme ich ans Ziel.
Der Befehl oCell.Validation.getFormula1() liefert mir "0";"100"
Die Konstruktion
oValidation = oCell.Validation
oValidation.Type = com.sun.star.sheet.ValidationType.LIST
oValidation.setFormula1(0,100)
oCell.Validation = oValidation
setzt nur die 0. Was ist da noch falsch?
Der Befehl oCell.Validation.getFormula1() liefert mir "0";"100"
Die Konstruktion
oValidation = oCell.Validation
oValidation.Type = com.sun.star.sheet.ValidationType.LIST
oValidation.setFormula1(0,100)
oCell.Validation = oValidation
setzt nur die 0. Was ist da noch falsch?
Re: Calc; Zell-Gültigkeit
Hast du's mal mit "0" statt 0 … versucht?weinbach hat geschrieben:Was ist da noch falsch?
Gruß
lorbass
Re: Calc; Zell-Gültigkeit
Hallo
Calc möchte da tatsächlich eine literale Zeichenkette:
in python:
in Basic wird das dann extrem hässlich, weil du sämtliche "quotes einzeln escapen musst plus die quotes aussenrum
Calc möchte da tatsächlich eine literale Zeichenkette:
in python:
Code: Alles auswählen
oValidation.setFormula1('"0";"100"')Code: Alles auswählen
oValidation.setFormula1("""0"";""100""") LO25.2.x.y debian 13(trixie) auf Raspberry5 8GB (64bit)
LO25.8.x.y flatpak debian 13(trixie) auf Raspberry5 8GB (64bit)
LO25.8.x.y flatpak debian 13(trixie) auf Raspberry5 8GB (64bit)
