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

Ask Your Question
1

Import from excel to PSSE

asked Apr 17 '13

USMAN KHALID gravatar image

I want to generate a list that include bus#, gen ID, Pgen, Pmax, Qgen, Qmax of a specific area. The list produced should be editable form and while editing it should give total MW change. Is it possible that we import the list from PSSE to excel and after changing import back to PSSE? If yes,then how to do it?

2 answers

Sort by » oldest newest most voted
1

answered Apr 19 '13

jsexauer gravatar image

You could do this using python, but it would be overkill. Assuming you are using PSS/E ver 30 or newer, use the GUI.

  1. Create a subsystem for the area you want study
  2. Click on the "Machine" tab.
  3. Select all the rows. Copy-paste them into excel.

Hope this is clear.

link

Comments

Agreed, the GUI in PSSE is more than capable here. A good choice.

JervisW gravatar imageJervisW (Apr 20 '13)
0

answered Apr 19 '13

rimux gravatar image

I am doing like this:

from win32com.client import Dispatch
xlApp = Dispatch("Excel.Application")

def XLSReadValue(xbook,xsheet,cell,x,y): #x,y - offset from cell
  value = xlApp.Workbooks(xbook).Sheets(xsheet).Range(cell).Offset(x+1,y+1).Value
return value

def XLSWriteValue(xbook,xsheet,cell,x,y,value): #x,y - offset from cell
  xlApp.Workbooks(xbook).Sheets(xsheet).Range(cell).Offset(x+1,y+1).Value=value

Than, if I want to get from excel value from cell A1:

n=XLSReadValue('book.xls','sheet1','A1',0,0)
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: Apr 17 '13

Seen: 1,430 times

Last updated: Apr 19 '13