Ask Your Question

import pssexcel Excel 2016

asked 2019-07-18 19:19:37 -0500

wyattpython gravatar image

updated 2019-07-18 19:49:17 -0500

The following code was meant to redirect folder path when my computer transition between Window 7 to Windows 10. using the same PSSE 33.4

code_loc = r"C:\Common Modules"


os.environ['PATH'] = os.environ['path'] + ';' + code_loc

from codedicttofromcsv import *



win10=str(input('Are you using windows 10? '))

if str(win10).isdigit()==1:




if str(win10.upper())=='N': PSSE_LOCATION = r"C:\Program Files\PTI\PSSE33\PSSBIN"

else: PSSE_LOCATION = r"C:\Program Files (x86)\PTI\PSSE33\PSSBIN"


os.environ['PATH'] = os.environ['path'] + ';' + PSSE_LOCATION

import psspy

import redirect

import pssarrays

import pssexcel

On my old computer(WIndows 7, Excel 2010), the following error comes up when I had an excel file opened that can't be closed immediately. Now that I have my new computer, Windows 10, Excel 2016. I get the following error every time I import pssexcel though I can't find any Excel program on Task Manager.

Traceback (most recent call last):

File "M:\DiagramsPlatypus\Network Security_PSSE Programs\PSSEOutageProg", line 57, in <module>

import pssexcel

File ".\", line 36, in <module>

File ".\", line 10, in <module>

File ".\", line 1922, in _getDefaultXLFileExtension

AttributeError: 'NoneType' object has no attribute 'Quit'

Might I know if anyone has any idea what the cause is and how I can fix this, please? I can't find the source code for pssexcel to see what it's after.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-07-19 10:57:09 -0500

jconto gravatar image

I am also using Win10 and Excel 2013 but I installed PSSe v.33.12.1 in its default path, without problems! In your code above, the line:

if str(win10.upper())=='N': PSSE_LOCATION = r"C:\Program Files\PTI\PSSE33\PSSBIN"

indicates that your path for Win10 is not the default path. PSSe v33 is a 32-bit program and it is recommended to be installed in the default "C:\Program Files (x86)\PTI\PSSE33" path.

Also, it is better to use the "import psse33" module to set PSSe paths, valid for any OS version:

import psse33     #sets PSSe path
import psspy
import redirect
import pssarrays
import pssexcel
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


Asked: 2019-07-18 19:19:37 -0500

Seen: 69 times

Last updated: Jul 19