Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Free way to read and write CSV

  • galexis

    galexis - 2021-05-31

    I want to read and write CSV. What is the best way to do it for free ? And have you example ?
    Thank for your help.

  • galexis

    galexis - 2021-06-01

    Thank you, but I ask question because I didn't find recent solution with example.


    Last edit: galexis 2021-06-01
  • fleaplc

    fleaplc - 2021-06-10

    an example is pretty huge...and it'll referred to a specific file. In terms of concept you had to:
    1-open the csv file (FILE.Open FB) --> get header of file (file.CAA.HANDLE)
    2-using the header you read the 1st row (FILE.Read FB)
    3-you have to update the header to the last character read (File.GetPos --> File.SetPos)
    4-read the 2nd row (FILE.Read FB)
    x - close the file (FILE.Close)

    I suggest to read Codesys help and try to read a small piece of a csv, then you'll can proceed to write something into csv


Log in to post a comment.