Ask Your Question
1

import pssexcel

asked 2013-12-12 21:45:14 -0500

@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.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2013-12-13 15:50:23 -0500

terrytian gravatar image

updated 2013-12-13 15:55:38 -0500

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.

edit flag offensive delete link more

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 ( 2013-12-16 14:03:18 -0500 )edit

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 ( 2016-09-19 16:26:54 -0500 )edit
0

answered 2014-01-30 22:16:32 -0500

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

edit flag offensive delete link more

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 ( 2014-01-31 12:16:56 -0500 )edit

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 ( 2014-02-04 18:35:38 -0500 )edit

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-12-12 21:45:14 -0500

Seen: 1,034 times

Last updated: Jan 30 '14