0

Close ACCC excel report

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

Peter B's avatar
125
Peter B
asked 2013-10-15 01:02:35 -0500, updated 2013-10-15 18:20:20 -0500
edit flag offensive 0 remove flag close merge delete

Comments

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

amaity's avatar amaity (2013-10-15 20:45:30 -0500) edit
add a comment see more comments

1 Answer

0

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.

Peter B's avatar
125
Peter B
answered 2013-10-15 23:59:22 -0500
edit flag offensive 0 remove flag delete link

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's avatar yfwing (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's avatar Peter B (2013-10-20 22:27:16 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer