First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

Close ACCC excel report

asked Oct 15 '13

Peter B gravatar image

updated Oct 16 '13

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

Comments

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

amaity gravatar imageamaity (Oct 16 '13)

1 answer

Sort by » oldest newest most voted
0

answered Oct 16 '13

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.

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 gravatar imageyfwing (Oct 18 '13)

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 (Oct 21 '13)

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Oct 15 '13

Seen: 847 times

Last updated: Oct 15 '13