Python crash when trying to generate an Excel worksheet with VBA macros

Brian almondb at gmail.com
Thu Oct 5 01:57:35 CEST 2006


dan_roman wrote:
> Hi,
> I developed a script with a nice interface in Tkinter that allows me to
> edit some formulas and to generate an Excel worksheet with VBA macros
> within it. The script runs perfectlly in Office 2000, but in Office
> 2003 crash at line: "wbc = workbook.VBProject.VBComponents.Add(1)"
> Please help me :-(

The Excel on the box you're testing this, have you set it to trust
programmatic access to the VB Project?  If you haven't, I wouldn't be
surprised if that line would likely raise an exception.  I'm pretty
sure Excel's security model has changed a bit between 2000 and 2003, so
perhaps this is what is biting you.




More information about the Python-list mailing list