Ask Your Question
1

pssexcel never generates file

asked 2014-08-27 09:37:45 -0500

JoshCorp gravatar image

I have an automation for running multiple accc scenarios and I was hoping to add in a line at the end to output the results to excel. I have used the pssexcel command previously without issue but never within a loop. When it runs, everything seems to go as planned without error except that the excel files are never created. The output window even says that the results have been output to file but the file is never generated.

Has anyone had this problem before? Thanks!

edit retag flag offensive close merge delete

Comments

It might be getting stored in C:\Program Files (x86)\PTI\PSSE33\EXAMPLE or PSSBIN folder !

Mahesh gravatar imageMahesh ( 2014-08-27 23:33:38 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-08-27 20:21:04 -0500

Eli Pack gravatar image

I've had success exporting ACCC results to Excel in a loop, but I tend to put them in different sheets within the one file. Here is some of my code:

import pssexcel

THISFOLDER = os.path.abspath(os.path.dirname(sys.argv[0])) # You may need to change this line with your folder location.
# Look through all files in the directory looking for the right extension
accfiles = []
for f in os.listdir(THISFOLDER):
    if f.lower().endswith(".acc"):
        accfiles.append(f)

total_files = len(accfiles)
count = 0
for accfile in accfiles:
    count = count + 1
    print "Processing ACCC file", count, "of", total_files
    print "File =", accfile
    xlsfile = "ACCC_Results.xls"
    sheet = accfile[:-4]
    print "SHEET =", sheet
    pssexcel.accc(THISFOLDER + "\\" + accfile, ['s','e','b'], colabel='', stype='contingency',busmsm=0.5, sysmsm=5.0, rating='a', namesplit=True, xlsfile=xlsfile,sheet=sheet, overwritesheet=True, show=True, ratecon='c',baseflowvio=False, basevoltvio=False, flowlimit=90.0, flowchange=0.0,voltchange=0.0)
print "Script finished."
edit flag offensive delete link more

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: 2014-08-27 09:37:45 -0500

Seen: 448 times

Last updated: Aug 27 '14