On Jan 9, 8:23 am, John Machin <sjmac...@lexicon.net> wrote: > On Jan 9, 9:56 pm, pp <parul.pande...@gmail.com> wrote: > > > On Jan 9, 3:52 am, Jon Clements <jon...@googlemail.com> wrote: > > > > On Jan 9, 10:44 am, pp <parul.pande...@gmail.com> wrote: > > > > > On Jan 9, 3:42 am, Jon Clements <jon...@googlemail.com> wrote: > > > > > > On Jan 9, 10:24 am, pp <parul.pande...@gmail.com> wrote: > > > > yeah all my versions are latest fromhttp://www.python-excel.org. > > > > just checked!! > > How did you check? > > > > > what could be the problem? > > > > Does rb = xlrd.open_workbook('somesheet.xls', on_demand=True) work by > > > itself? > > > Yes it does. The problem is with line: wb = copy(rb) > > here I am getting the error: AttributeError: 'Book' object has no > > attribute 'on_demand' > > Please replace the first 4 lines of your script by these 6 lines: > > import xlrd > assert xlrd.__VERSION__ == "0.7.1" > from xlwt import easyxf > from xlutils.copy import copy > rb = xlrd.open_workbook( > 'source.xls',formatting_info=True, on_demand=False) > > and run it again. Please copy all the output and paste it into your > response.
This time when I ran the code sent by you I got the following results:I am using ipython for running the code. AssertionError Traceback (most recent call last) /home/parul/CODES/copy_1.py in <module>() 1 ----> 2 import xlrd 3 assert xlrd.__VERSION__ == "0.7.1" 4 from xlwt import easyxf 5 from xlutils.copy import copy 6 rb = xlrd.open_workbook('source.xls',formatting_info=True, on_demand=False) AssertionError: WARNING: Failure executing file: <copy_1.py> I used www.python-excel.org to get xlrd and xlwt .. so they are latest versions. -- http://mail.python.org/mailman/listinfo/python-list