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

Ask Your Question
1

import pssexcel

asked Dec 13 '13

@Montreal gravatar image

Hi all, I try to run the line: "import pssexcel" in python but the erro was: "ImportError: No module named pssexcel" Someone know how to fix it? Tks.

2 answers

Sort by » oldest newest most voted
1

answered Dec 13 '13

terrytian gravatar image

updated Dec 13 '13

Which PSS/E version are you using?

The 'pssexcel' module needs the 'win32api' module, and the 'win32api' is not installed with the original python. So you need to install pywin32 in order to import win32api module to python. The pywin32 can be downloaded from internet.

If you run your python code directly within the PSS/E version 33 GUI, you probably have some problem with the win32api module. This is because there is a conflict between PSS/E 33 GUI and win32api module. I don't know how to solve this problem.

However, you can use an alternative method, that is to run python on top of PSS/E, in other words, run python independently without running PSS/E. What you need to do is to tell python where the module psspy and pssexcel located in your computer. You can find this method in this forum. This has been discussed time and time again.

Your question is very similar to the previous question titled 'Exporting PV curve data from PSS/E to excel'. Your can search that question in this forum for some information.

link

Comments

Regarding python on top see the Whit [post](http://www.whit.com.au/blog/2012/10/import-psse-into-your-python-script/) for a nice description of how/why to run python on top

chip gravatar imagechip (Dec 16 '13)

Hey Terry, I can run the pssexcel module fine on my computer but when others in my group use the program, they get the DLL not found error. Everyone in the group is using PSSE 33.9. Any suggestions or comments are appreciated. Thanks.

Power_System_Engineer gravatar imagePower_System_Engineer (Sep 19 '16)
0

answered Jan 31 '14

chiangm gravatar image

Hi Terry and anyone,

Issue with importing pssexcel. Below is the error message. Does anyone know how to get this working?

Regards, Michael

Traceback (most recent call last): File "M:\test.py", line 1, in <module> import pssexcel 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:M:\test.py

link

Comments

you should post this as new question. Also how do you try to import pssecel? From system python? Are you invoking psse with a script as an argument? From within PSSE?

chip gravatar imagechip (Jan 31 '14)

From within PSSE, my python code has import pssexcel. There seem to be an issue with PSSEv33.4 where the GUI excel icon does not appear. I reverted to PSSE33.3, no issues with importing pssexcel

chiangm gravatar imagechiangm (Feb 5 '14)

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: Dec 13 '13

Seen: 2,075 times

Last updated: Jan 30 '14