Ask Your Question
0

Close ACCC excel report

asked 2013-10-15 01:02:35 -0500

Peter B gravatar image

updated 2013-10-15 18:20:20 -0500

Hi,

I have a script I use to run ACCC studies that uses the pssexcel.accc command. At the moment it's very basic and just runs a study for whatever case is loaded into PSS/E.

I'm trying to update the script so that it runs on multiple cases recorded in a .dat file.

My issue is that it seems to only give me an ACCC excel report for the last case listed in the .dat file. So what I think I'm missing is some code to save and close each excel report as the code loops through.

How do I save and close an excel workbook created by pssexcel.accc?

Thanks,

Peter

edit retag flag offensive close merge delete

Comments

Can we look at your code? That would make things much easier.

amaity gravatar imageamaity ( 2013-10-15 20:45:30 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-10-15 23:59:22 -0500

Peter B gravatar image

I figured this out:

import excelpy
xl = excelpy.workbook()
xl.close()

Will close an open excel workbook created by pssexcel.accc.

But I've got far stranger issues in my script that I might put a separate question up for.

edit flag offensive delete link more

Comments

Just FYI, I never had to add the above extra code in order to use pssexcel. BTW, did you run you code outside of PSS/E (i.e., directly from Python IDLE or other types of python interpreter)?

yfwing gravatar imageyfwing ( 2013-10-18 10:52:14 -0500 )edit

I was running from Python IDLE. I don't need the above lines to run pssexcel.accc on a single case, but when looping through multiple cases it seems to need it.

Peter B gravatar imagePeter B ( 2013-10-20 22:27:16 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Stats

Asked: 2013-10-15 01:02:35 -0500

Seen: 832 times

Last updated: Oct 15 '13