Modelling chp plants with the excel/csv-reader

The second block is wrong because there is not attribute el_outputs.

The first one looks fine at first glance (but you should use the code-bloc function of this forum).

To debug the block you could divide it.

for i, t in transformers.iterrows():
    if noded.get(i) is not None:
        print("Key {0} already exist.".format(i))
    noded[i] = 5
    from_bus = noded[t['from']]
    el_bus = noded[t['bus_el']]
    th_bus = noded[t['bus_heat']]
    cap_el = t[‘capacity_el’]
    [...]
    in_flow = solph.Flow()
    noded[i] = solph.Transformer(
        label=i,
        inputs={from_bus: in_flow},
        outputs=...
    

In that way you can check the type and the value of any part. If everything is fine the creation of the class should be fine, too.

If you still do not succeed you can reduce the example to the necessary buses and this transformer-sheet and publish the code and the excel file anywhere or send it to me. So that I can have a look.