Ask Your Question

Revision history [back]

To extract data from .out files to excel datasheet I use this script in python: (simply copy the code between the lines made of '#' to a .py extension file and run it, you should change the path to pss/e bin path and should run it from the same folder of your .out file)

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

import os,sys

sys.path.insert(0,'C:\Program Files (x86)\PTI\PSSEXplore33\PSSBIN')

os.environ['PATH'] = 'C:\Program Files (x86)\PTI\PSSEXplore33\PSSBIN'+';'+os.environ['PATH']

import excelpy

import dyntools

import time

name='x';

data=str(time.localtime().tmmday)+" do "+str(time.localtime().tmmon);

outfile = dyntools.CHNF(name+'.out')

shorttitle, chaniddict, chandatadict = outfile.getdata()

xlsfile=name+'.xlsx';

xl = excelpy.workbook(xlsfile, mode='w');

outfile.xlsout(sheet=name,overwritesheet=True);

xl.close();

xl.save();

xl.close();

# # # # # # # # # # # # # # # # # # # # # # # # # #

To extract data from .out files to excel datasheet I use this script in python: (simply copy the code between the lines made of '#' to a .py extension file and run it, you should change the path to pss/e bin path and should run it from the same folder of your .out file)file, alse change the variable "name" to the name of your .out (in this case the file was "x.out" ))

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

import os,sys

sys.path.insert(0,'C:\Program Files (x86)\PTI\PSSEXplore33\PSSBIN')

os.environ['PATH'] = 'C:\Program Files (x86)\PTI\PSSEXplore33\PSSBIN'+';'+os.environ['PATH']

import excelpy

import dyntools

import time

name='x';

data=str(time.localtime().tmmday)+" do "+str(time.localtime().tmmon);

outfile = dyntools.CHNF(name+'.out')

shorttitle, chaniddict, chandatadict = outfile.getdata()

xlsfile=name+'.xlsx';

xl = excelpy.workbook(xlsfile, mode='w');

outfile.xlsout(sheet=name,overwritesheet=True);

xl.close();

xl.save();

xl.close();

# # # # # # # # # # # # # # # # # # # # # # # # # #