Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

import excelpy

ierr, totalload = psspy.systot('LOAD')

P = totalload.real Q = totalload.imag

wb = excelpy.workbook()

wb.setcell('A1', P) wb.setcell('B1', Q)

I'm sure you can elaborate on that basic code.

import excelpy

ierr, totalload = psspy.systot('LOAD')

P = totalload.real Q = totalload.imag

wb = excelpy.workbook()

wb.setcell('A1', P) wb.setcell('B1', Q)

I'm sure you can elaborate on that basic code.

You cannot export complex numbers using this set_cell function, only real numbers. That's why I am exporting P and Q into separate cells. If you try to export a complex number you get this error message.

TypeError: Objects of type 'complex' can not be converted to a COM VARIANT