von Karolus » Fr, 14.03.2014 11:27
Hallo
Ich schieb hier mal zum Vergleichen nach wie das in Python ginge:
Code: Alles auswählen
def nummerierung():
template =( '<a href="img/Fotos/Bild{0:04d}.jpg" '
'data-lightbox="Obst"><img src="img/Fotos/Bild'
'{0:04d}_thumbnail.jpg"></a>'.format )
doc = XSCRIPTCONTEXT.getDocument()
sheet = doc.Sheets.getByIndex(0)
out = [(template(x),) for x in range(1,1256)]
crange = sheet.getCellRangeByPosition(0,0,0,len(out)-1)
crange.DataArray =tuple( out )
Karolus
Hallo
Ich schieb hier mal zum Vergleichen nach wie das in Python ginge:
[code=php]def nummerierung():
template =( '<a href="img/Fotos/Bild{0:04d}.jpg" '
'data-lightbox="Obst"><img src="img/Fotos/Bild'
'{0:04d}_thumbnail.jpg"></a>'.format )
doc = XSCRIPTCONTEXT.getDocument()
sheet = doc.Sheets.getByIndex(0)
out = [(template(x),) for x in range(1,1256)]
crange = sheet.getCellRangeByPosition(0,0,0,len(out)-1)
crange.DataArray =tuple( out ) [/code]
Karolus