pyExcelerator: writing multiple rows

patrick.waldo at gmail.com patrick.waldo at gmail.com
Sat Jan 19 08:46:42 EST 2008


Hi all,

I was just curious if there was a  built-in or a more efficient way to
do take multiple rows of information and write them into excel using
pyExcelerator.  This is how I resolved the problem:

from pyExcelerator import *

data = [[1,2,3],[4,5,'a'],['','s'],[6,7,'g']]

wb=pyExcelerator.Workbook()
test = wb.add_sheet("test")

c=1
r=0
while r<len(data):
    for d in data[r]:
        test.write(r,c,d)
        c+=1
    r+=1
    c=1
wb.save('c:\\1\\test.xls')



More information about the Python-list mailing list