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

Ask Your Question
0

Error when executing 'import excelpy'

asked Feb 24 '17

fadi gravatar image

Hey all, i am trying to export psse data to excel using python. When I try to execute 'import excelpy', it gives following error

Traceback (most recent call last): File "C:\Users\Hassan\Desktop\Automation\test.py", line 7, in <module> import excelpy File ".\excelpy.py", line 168, in <module> File "C:\Program Files\Python 2.7\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\Hassan\Desktop\Automation\test.py

Please help.

Comments

I have the same problem, can someone solve it?

YI-WEI gravatar imageYI-WEI (Aug 27 '17)

1 answer

Sort by » oldest newest most voted
0

answered Jul 19 '17

knucklehead gravatar image

updated Jul 19 '17

Which PSSE version are you using? Are you setting the environment variables?

#SET EVIRONMENT VARIABLES --------------------------------------------------
    if psseversion==1:
        try: import psse34
        except: psseversion=0
    if psseversion==0:
        _PSSBINPATH = r"C:\Program Files (x86)\PTI\PSSE33\PSSBIN"
        os.environ['PATH'] = _PSSBINPATH + ';' + os.environ['PATH']
        sys.path.insert(0,_PSSBINPATH)

3phaseee.com

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

1 follower

Stats

Asked: Feb 24 '17

Seen: 1,323 times

Last updated: Jul 18 '17