First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Yes, you can do it with formula COMPLEX!
First, define a function converting the complex value to an Excel complex formula:
def complex_formula(cmplx):
return "=complex("+str(totalload.real)+","+str(totalload.imag)+")"
Then use the function when writing to Excel:
wb.set_cell((1,'a'),complex_formula(totalload))
2 | No.2 Revision |
Yes, you can do it with formula COMPLEX!
First, define a function converting the complex value to an Excel complex formula:
def complex_formula(cmplx):
return "=complex("+str(totalload.real)+","+str(totalload.imag)+")"
"=complex("+str(cmplx.real)+","+str(cmplx.imag)+")"
Then use the function when writing to Excel:
wb.set_cell((1,'a'),complex_formula(totalload))