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

Ask Your Question
0

PSSE excel export problems( pssexcel)

asked Mar 13 '14

Tak gravatar image

updated Mar 13 '14

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)

2 answers

Sort by » oldest newest most voted
1

answered Mar 14 '14

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.

link
0

answered Mar 18 '14

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.

link

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: Mar 13 '14

Seen: 1,319 times

Last updated: Mar 18 '14