Ask Your Question
0

PSSE excel export problems( pssexcel)

asked 2014-03-13 07:56:36 -0600

Tak gravatar image

updated 2014-03-13 07:57:58 -0600

I need help.

When I use pssexcel.accc in python, I have the following error. Do you know how to fix this? I do not know why I have this errors.

pssexcel.accc(caseset+'.acc', string=['s','e','b','','v','','',''],colabel='',stype='', busmsm=0.5,rating='a', namesplit=True,xlsfile=caseset, sheet='', overwritesheet=True, show=True,ratecon='c', baseflowvio=True, basevoltvio=True,flowlimit=95, flowchange=0.0, voltchange=0.0)

File ".\pssexcel.py", line 1387, in accc File ".\pssexcel.py", line 575, in accccoevents File ".\excelpy.py", line 826, in setrange File ".\excelpy.py", line 1186, in activerange File "C:\Python27\lib\site-packages\win32com\genpy\00020813-0000-0000-C000-000000000046x0x1x7\Range.py", line 686, in call , ColumnIndex) File "C:\Python27\lib\site-packages\win32com\client_init_.py", line 456, in _ApplyTypes self.oleobj.InvokeTypes(dispid, 0, wFlags, retType, argTypes, *args), com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2146827284), None)

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-03-14 00:38:34 -0600

Eli Pack gravatar image

It looks like you have a problem with win32com. It causes problems for me all the time. I've always gotten it to work eventually, but it takes some fiddling. First, I'd try deleting (or renaming) the folder "C:\Python27\Lib\site-packages\win32com\gen_py".

I've also had some luck with setting Excel to run in different compatibility modes. Find excel.exe, right click and go into the properties, and try a couple of different compatibility modes (e.g. XP service pack 3 or windows 7).

If that doesn't work, uninstall Python 2.7 and delete the "C:\Python27" folder. You'll need to reinstall Python and win32com (search for wxPython2.8-win32-unicode-2.8.12.1-py27.exe).

Good luck.

edit flag offensive delete link more
0

answered 2014-03-18 02:52:46 -0600

MW gravatar image

Also make sure you have closed the excel application (no open excel sheets) while you run it. I usually get an error similair to that when i forget to close them and then run the script.

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

Stats

Asked: 2014-03-13 07:56:36 -0600

Seen: 1,309 times

Last updated: Mar 18 '14