error in export

I am trying to export data using :

*-------------------------line 581-------------------------------------
embeddedCode Connect:
- GAMSReader:
    symbols: [ { name: pgrid }, { name: rep } ]
- Projection:
    name: pgrid.l(t)
    newName: pgrid_l(t)
- CSVWriter:
    file: ResultIITK2025.xlsx
    symbols:
      - { name: pgrid_l, range: Pthermal!A1 }
      - { name: rep, range: rep!A1 }
endEmbeddedCode
*--------------------------------------------------------------

This code used to work for GAMS 1.15.5. However, in the latest version, GAMS 1.16.4, I am getting the following errors:

*--------------------------------------------------------------
 Execute embedded library embconnectcclib64.dll
Exception from Connect: Validation of input for agent 'CSVWriter' failed: {'name': ['required field'], 'symbols': ['unknown field']}
*** Error at line 581: Error executing "embeddedCode" section: Check log above
*--------------------------------------------------------------

The Connect CSVWriter requires a name field and has no symbols field as the error message clearly states and this has not changed between GAMS versions. The Connect code looks more like you actually wanted to use the ExcelWriter.

I am not sure what “GAMS 1.15.5” and “GAMS 1.16.4” refers to, GAMS has no such versions (the latest GAMS version is currently GAMS 49.6.0). Maybe you mean GAMS Studio versions that would mean you probably have GAMS version 45. Since Connect has been a rather new addition to GAMS and still gets many updates, I recommend to update GAMS to the latest version.