Menu

#7 Setting too many col widths causes Excel crash

open
nobody
None
5
2006-10-09
2006-10-09
Anonymous
No

Setting the widths of more than (roughly) 255 columns
causes Excel 2000 to crash (my version is 9.0.2720).
Excel 2002 complains about the generated .xls file
being damaged, but manages to repair the file.

I was (accidentally) doing this for 301 columns:

sheet.col(colIndex).width = colWidth

It would be nice if pyExcelerator complained when you
do this, instead of letting Excel crash.

A colleague suggests newer versions of Excel may no
longer have this 255-column limit. If so, perhaps
there should be some way for users of pyExcelerator to
declare what (range of?) Excel version(s) they want to
be able to read the generated .xls file, and complain
iff adding too many columns might crash the versions of
Excel you're interested in (if this feature is already
there, sorry I missed it).

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Can't seem to login from here -- if you want more info, my
    email is jjl at pobox.com

     
  • Chris P. Ross

    Chris P. Ross - 2012-02-13

    I think this is unrelated to column widths. I think createing a worksheet with more than 255/256 columns is causing it. At least, it is for me.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.