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

Ask Your Question
1

ACCC Output to Excel

asked Apr 19 '13

anonymous user

Anonymous

updated Apr 22 '13

I am currently working on outputting the results of a directory of .acc files to a single excel sheet. I am using PSSE33 and just playing with the pssexcel function to see if it improves over our current method of using the acccsinglerunreport4 API. Currently this is what my code looks like:

import os,sys

PSSE_LOCATION = r"C:\Program Files\PTI\PSSE33\PSSBIN" sys.path.append(PSSELOCATION) os.environ['PATH'] = os.environ['PATH'] + ';' + PSSE_LOCATION

import pssexcel

pssexcel.accc('conting.acc', 's', 'contingency.xls')

When I run this in PSSE I get the following error:

File ".\pssexcel.py", line 36, in 'module' File ".\excelpy.py", line 168, in 'module' File "C:\Python27\lib\site-packages\win32com_init_.py", line 5, in 'module' import win32api, sys, os ImportError: DLL load failed: The specified module could not be found. Couldn't open Python file:C:\Users\def\Documents\Python\CSV\Acc2exc.py

Does anyone know what DLL this is? Any Idea of a fix?

Comments

I tried re-installing Python 2.7. That didn't work out. This was simply an investigation into a better method than the method we have in place now for creating an output spreadsheet of ACCC's. I'm going to set the idea on the shelf for a little while and come back to it with a fresh perspective.

df2468 gravatar imagedf2468 (Apr 22 '13)

Are you on the latest point release of PSSE? I ran into some win32com bugs with the early versions of the v33 releases while working with the accc functions. An upgrade to the latest PSSE release fixed it up.

chip gravatar imagechip (Apr 23 '13)

I am running V33.4 as well as V32.2 on this computer. I installed V33.4 just last week.

df2468 gravatar imagedf2468 (Apr 23 '13)

DId you try installing `pywin32` - it doesn't come with Python2.7 so re-installing Python wouldn't have done anything.

JervisW gravatar imageJervisW (Apr 26 '13)

1 answer

Sort by ยป oldest newest most voted
0

answered Apr 22 '13

JervisW gravatar image

How annoying that the DLL name isn't provided for you. I'm afraid there isn't much I could do to help you, but here is a guess:

the win32api file is part of the pywin32 package. Which doesn't normally ship with Python, and is an optional extra. I think PSSE would normally install it, but perhaps the installation is broken, or someone selected "no" to installing the additional package.

So here is a link to the official project page for pywin32http://sourceforge.net/projects/pywin32/. I'd try to re-install the version for Python 2.7 Windows.

link

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: Apr 19 '13

Seen: 1,366 times

Last updated: Apr 22 '13