Jul 18, 2009, 9:32:47 PM7/18/09
Hi, all friends.
I'm using PyExelerator to create Excel report for users to download. I tried to save the Workbook object to a StringIO which is said a file-like object, but the result is an empty file. Following are the codes:
#.... generating workbook codes
f = StringIO.StringIO()
doc = CompoundDoc.XlsDoc()
#the "doc.save_to" func was added to the Workbook class in the pyExelerator's module by myself. There was a original
#"save" method there take two argument, the first one is a file object, the second one is the same as mine.
response.headers['Content-Length'] = f.tell()
What's the problem? Thanks in advance.