mit
Code: Alles auswählen
oList1 = oForm.GetByName("Breite")
Code: Alles auswählen
oList1 = oForm.GetByName("Breite").getSelectedItems()
Moderator: Moderatoren
Code: Alles auswählen
oList1 = oForm.GetByName("Breite")
Code: Alles auswählen
oList1 = oForm.GetByName("Breite").getSelectedItems()
Code: Alles auswählen
oList1 = oForm.GetByName("Breite").SelectedItems
Code: Alles auswählen
oList1 = oForm.GetByName("Breite").getItemText(Nummer des Eintrages)
Code: Alles auswählen
oDoc = thisComponent.sheets("Eingabe")
oForm = oDoc.DrawPage.Forms.GetByName("Dateneingabe")
Breite = oForm.GetByName("Breiten")
cnt = UBound(Breite.SelectedItems)
Items = UBound(Breite.StringItemList)
MsgBox Breite.StringItemList(3)
Code: Alles auswählen
Breite = array("25 cm","30 cm","40 cm","50 cm","60 cm","70 cm","80 cm","100 cm")
indem du z. B. die einzelnen Elemente ausliest und in ein neues Array steckst:Aber wie kann ich denn diese Werte anstelle der bisher genutzten Array verwenden?
Code: Alles auswählen
oDoc = thisComponent.sheets("Eingabe")
oForm = oDoc.DrawPage.Forms.GetByName("Dateneingabe")
Breite = oForm.GetByName("Breiten")
cnt = UBound(Breite.SelectedItems)
aBreiten=DimArray(cnt)
for i=0 to cnt
aBreiten(i)=Breite.StringItemlist(Breite.SelectedItems(i))
next
Code: Alles auswählen
Preis = wert3.StringItemList(wert3.SelectedItems(a))
aPreis = Preis(a)/ 119 * 100 'berechnet netto aus brutto
Code: Alles auswählen
Sub Varianten
oDoc = thisComponent.sheets("Eingabe")
oForm = oDoc.DrawPage.Forms.GetByName("Dateneingabe")
Wert1 = oForm.GetByName("Breiten")
Wert2 = oForm.GetByName("Farben")
Wert3 = oForm.GetByName("Preis")
id = oForm.GetByName("id")
Nr = id.text
sku = oForm.GetByName("sku")
Ref = sku.text
Attr = "Breite:select:0, Farbe:select:1"
Menge = 100
mMenge = 1
'k = ermittelt die Anzahl der Kombinationen
k = (UBound(Wert1.SelectedItems())+1)*(ubound(Wert2.selecteditems())+1)
for n = 1 to k
Bild = b + 1
Breite = wert1.StringItemList(wert1.SelectedItems(a))
Farbe = wert2.StringItemList(wert2.SelectedItems(b))
Preis = wert3.StringItemList(wert3.SelectedItems(a))
aPreis = Preis(a)/ 119 * 100 'berechnet netto aus brutto
Reference = Ref + "-" + format(art + 1, "000")
Value = "Breite " + Breite(a)+":0, "+ Farbe(b) + ":1"
'Es werden Werte für den Prestasho Import generiert
thisComponent.sheets(1).getcellbyposition(1,n).setstring(Attr())
thisComponent.sheets(1).getcellbyposition(2,n).setstring(Value())
thisComponent.sheets(1).getcellbyposition(0,n).setstring(Nr(n))
thisComponent.sheets(1).getcellbyposition(4,n).setstring(Reference())
thisComponent.sheets(1).getcellbyposition(8,n).setstring(aPreis())
thisComponent.sheets(1).getcellbyposition(10,n).setstring(Menge())
thisComponent.sheets(1).getcellbyposition(11,n).setstring(mMenge())
thisComponent.sheets(1).getcellbyposition(15,n).setstring(Bild())
b = b + 1
art = art + 1
if b > ubound(Wert2.selecteditems()) then : a = a + 1 : b = 0 : end if
next n
End Sub
Code: Alles auswählen
DIM Preis as Double
auf 2 Stellen begrenzt.aPreis = format(Preis(a)/ 119 * 100,"0.00")