pyExcelerator bug?
tkpmep at hotmail.com
tkpmep at hotmail.com
Wed May 16 18:42:48 EDT 2007
My program creates three lists: the first has dates expressed as
strings, the second has floats that are strictly positive, and the
third has floats that are strictly negative. I have no trouble writing
the data in these lists to a .csv file using the csv module using the
following code.
outfile = file(fn + '.csv','wb')
writer = csv.writer(outfile)
for i in range(len(dateList)):
writer.writerow([dateList[i], posVals[i], negVals[i]])
outfile.close()
However, when I try to write to an Excel file using pyExcelerator (see
code below), the third list is not always written correctly - my
program sometimes writes positive numbers into the third column of the
spreadsheet. Is this a known bug? if so, is there a workaround? Is
pyExcelerator being developed any longer? My attempts to reach the
developer have gone nowhere.
w = pyExcelerator.Workbook()
ws = w.add_sheet(fn + p)
for i,d in enumerate(dateList):
ws.write(i+1, 0, dateList[i])
ws.write(i+1, 1, posVals[i])
ws.write(i+1, 2, negVals[i])
w.save(fn+'.xls')
Sincerely
Thomas Philps
More information about the Python-list
mailing list