First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Hi,
In PSS/E V34.7.0 I am having the following problems:
Executing Python file:C:\Program Files (x86)\PTI\PSSE34\PSSPY27\excelexportw_frompsse.pyw
I therefore tried to see if I could extract the data from the .acc file using python code. My simple code is below
accfilename = 'file_name.acc'
xlsfilename = 'fileneme.xlsx'
"""Export results to excel"""
import pssexcel
# 's' or 'summary' ACCC Analysis Summary
# 'e' or 'events' Contingency Events Description
# 'b' or 'branch' Monitored Branch Flow (MVA)
# 'i' or 'interface' Monitored Interface Flow (MW)
# 'v' or 'voltage' Monitored Bus Voltage
# 'l' or 'load' Loads Shed (MW)
# 'g' or 'generator' Generator Dispatch (MW)
# 'p' or 'phase shifter' Phase Shifter Angle
options = ['s','e','b','v']
pssexcel.accc(accfile=accfilename, string=options, xlsfile=xlsfilename, ratecon = 'c', baseflowvio = True, basevoltvio = True, overloadreport = True)
Sometimes this works and creates an excel file like I used to be able to do via the GUI.
Sometimes, it starts to work, an excel file opens and starts to populate with data, but then crashes and gives the message below in the progress window in PSS/E:
File "Exportsresultsonly.py", line 25, in <module> pssexcel.accc(accfile=accfilename, string=options, xlsfile=xlsfilename, ratecon = 'c', baseflowvio = True, basevoltvio = True, overloadreport = True)
File ".\pssexcel.py", line 1724, in accc
File ".\pssexcel.py", line 786, in _accc_co_events
File ".\excelpy.py", line 889, in set_active_sheet
File "<COMObject <unknown>>", line 2, in Activate
pywintypes.com_error: (-2146777998, 'OLE error 0x800ac472', None, None)
2 | No.2 Revision |
Hi,
In PSS/E V34.7.0 I am having the following problems:
Executing Python file:C:\Program Files (x86)\PTI\PSSE34\PSSPY27\excelexportw_frompsse.pyw
I therefore tried to see if I could extract the data from the .acc file using python code. My simple code is below
accfilename = 'file_name.acc'
xlsfilename = 'fileneme.xlsx'
"""Export results to excel"""
import pssexcel
# 's' or 'summary' ACCC Analysis Summary
# 'e' or 'events' Contingency Events Description
# 'b' or 'branch' Monitored Branch Flow (MVA)
# 'i' or 'interface' Monitored Interface Flow (MW)
# 'v' or 'voltage' Monitored Bus Voltage
# 'l' or 'load' Loads Shed (MW)
# 'g' or 'generator' Generator Dispatch (MW)
# 'p' or 'phase shifter' Phase Shifter Angle
options = ['s','e','b','v']
pssexcel.accc(accfile=accfilename, string=options, xlsfile=xlsfilename, ratecon = 'c', baseflowvio = True, basevoltvio = True, overloadreport = True)
Sometimes this works and creates an excel file like I used to be able to do via the GUI.
Sometimes, it starts to work, an excel file opens and starts to populate with data, but then crashes and gives the message below in the progress window in PSS/E:
File "Exportsresultsonly.py", line 25, in <module> pssexcel.accc(accfile=accfilename, string=options, xlsfile=xlsfilename, ratecon = 'c', baseflowvio = True, basevoltvio = True, overloadreport = True)
File ".\pssexcel.py", line 1724, in accc
File ".\pssexcel.py", line 786, in _accc_co_events
File ".\excelpy.py", line 889, in set_active_sheet
File "<COMObject <unknown>>", line 2, in Activate
pywintypes.com_error: (-2146777998, 'OLE error 0x800ac472', None, None)
File "Exportsresultsonly.py", line 25, in <module>pssexcel.accc(accfile=accfilename, string=options, xlsfile=xlsfilename, ratecon = 'c', baseflowvio = True, basevoltvio = True, overloadreport = True)
File ".\pssexcel.py", line 1449, in accc
File ".\pssexcel.py", line 765, in _accc_summary
File ".\excelpy.py", line 446, in autofit_columns
File "<COMObject <unknown>>", line 2, in AutoFit
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 287, in _ApplyTypes_result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, retType, argTypes) + args)
pywintypes.com_error: (-2147023170, 'The remote procedure call failed.', None, None)