Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think that this overwritesheet = true option will overwrite latest sheet if it is called more than once during simulation.

In my case, I am re running the script rather than using the dyntools command more than once in the same script.

To overcome this, I check for and delete existing excel file in directory by adding the following code just before using dyntools.CHNF.xlsout(..)

if os.path.exists(xlsoutput):
   try:
      os.remove(xlsoutput)
   except WindowsError:
      print 'file is open'