0

How to import PV curve data into a .txt file?

When you generate the PV curves for an electrical system, you can download the graphs. But is it also possible to import the data or download the values into Excel spreadsheets or a text file?

rcamacho's avatar
1
rcamacho
asked 2026-08-10 16:25:22 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0

Hello, please see the follow code, this is for exporting the data of "QV curves" to excel file. Also, you can check the file in "Example"/"pssexcel_demo.py". Hope you can solve the problem!

qvfile  = 'filename.qv'
string  = ['s','v','m','g']
colabel = []
p, nx   = os.path.split(qvfile)
n, x    = os.path.splitext(nx)
xlsfile = 'filename'
sheet   = n + '_qv'
overwritesheet = True
pssexcel.qv(qvfile,string,colabel=colabel,xlsfile=xlsfile,sheet=sheet,overwritesheet=overwritesheet,show=True)
YKC's avatar
50
YKC
answered 2026-08-17 02:19:59 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

I use scripts like this to extract data for a *.pv file:

def get_volts(pvfile, colabel):
    "Return volts for a contingency"
    pvobj = arrbox.pv_pp.PV_PP(pvfile)
    summ = pvobj.summary()
    solnobj = pvobj.solution(colabel=colabel)

    return pd.DataFrame(
        index=solnobj.mwtransfer,
        columns=summ.mvbuslabel,
        data=solnobj.volts
    )


def get_amps(pvfile, colabel):
    "Return I as MVA"
    pvobj = arrbox.pv_pp.PV_PP(pvfile)
    summ = pvobj.summary()
    solnobj = pvobj.solution(colabel=colabel)

    return pd.DataFrame(
        index=solnobj.mwtransfer,
        columns=summ.mbranch,
        data=solnobj.mbrnamp
    )
jbarberia's avatar
38
jbarberia
answered 2026-08-26 13:36:24 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer