Ask Your Question
0

Error when executing 'import excelpy'

asked 2017-02-24 13:18:49 -0500

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.

edit retag flag offensive close merge delete

Comments

I have the same problem, can someone solve it?

YI-WEI gravatar imageYI-WEI ( 2017-08-27 11:45:12 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-07-18 19:25:23 -0500

knucklehead gravatar image

updated 2017-07-18 19:29:47 -0500

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

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

1 follower

Stats

Asked: 2017-02-24 13:18:49 -0500

Seen: 1,247 times

Last updated: Jul 18 '17