How to write data to .csv file?

sanket_patil
sanket_patil Altair Community Member
edited June 2021 in Community Q&A

Hello All,

I want to add data to in particular row and column in csv file using tcl. How to do that?

Please guide me for the same, Thanks in advance.

Thanks and Regards,

Sanket Patil

 

Answers

  • sanket_patil
    sanket_patil Altair Community Member
    edited June 2021
    Hello All, Can anyone guide me for this? Regards, Sanket
  • Hypermesh User
    Hypermesh User Altair Community Member
    edited June 2021

    Hi Sanket,

     

           I have created the Tcl code(Attached) for your request. You have to specify the row, column, value to be replaced.

                         Make suew name of  your csv file as input.csv or change the variable in code.

                         It will create a new csv file as output.csv with the repalced values you provided.

     

    I hope it will help you. If you find any difficulties and error in using my code ,please get back to me I will help you.

     

    Regards,

     

    Manoj M

  • sanket_patil
    sanket_patil Altair Community Member
    edited June 2021

    Hi Sanket,

     

           I have created the Tcl code(Attached) for your request. You have to specify the row, column, value to be replaced.

                         Make suew name of  your csv file as input.csv or change the variable in code.

                         It will create a new csv file as output.csv with the repalced values you provided.

     

    I hope it will help you. If you find any difficulties and error in using my code ,please get back to me I will help you.

     

    Regards,

     

    Manoj M

    Hello Manoj,

    Thanks for the help. Can you please resend the code file as i am not able to download it?

    Thanks and Regards.

    Sanket

  • Hypermesh User
    Hypermesh User Altair Community Member
    edited June 2021

    Hello Manoj,

    Thanks for the help. Can you please resend the code file as i am not able to download it?

    Thanks and Regards.

    Sanket

    PFA

  • sanket_patil
    sanket_patil Altair Community Member
    edited June 2021

    PFA

    Thank you so much for the help :)

    Regards,

    Sanket