Ask Your Question
1

ACCC Output to Excel

asked 2013-04-19 15:06:49 -0500

anonymous user

Anonymous

updated 2013-04-22 15:36:12 -0500

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?

edit retag flag offensive close merge delete

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 ( 2013-04-22 15:40:23 -0500 )edit

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 ( 2013-04-22 20:36:46 -0500 )edit

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

df2468 gravatar imagedf2468 ( 2013-04-23 08:58:23 -0500 )edit

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

JervisW gravatar imageJervisW ( 2013-04-26 00:57:17 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-04-22 02:53:16 -0500

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.

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: 2013-04-19 15:06:49 -0500

Seen: 1,351 times

Last updated: Apr 22 '13