Skip to main content
Solved

API to update csv?

  • September 6, 2024
  • 1 reply
  • 81 views

mshealy
Established Contributor
Forum|alt.badge.img+11

I am trying to figure out how i can get a CSV file updated.  I have an http client step in my workflow to get some information and i would like to be able to put that info that was returned in the step, into a csv.  I haven’t been able to find out were to do that within clm workflow.

Best answer by Scott Brooks

You can use the Write Text Document or Append Text Document step to create/update a document with a “.csv” extension.  You would want to construct the row to be added in the csv by concatenating variables with double quotes and commas as delimiters as part of building a string to write the new row.  I usually add a new row at the end of the string if we are going to write multiple rows.

Here is a quick example using the Expression Builder…

“\” + GetVariableValue("Column1") + “\”,\”” + GetVariableValue("Column2") + "\”\r\n"

 

 

1 reply

Scott Brooks
Troubleshooter
Forum|alt.badge.img+5
  • Troubleshooter
  • Answer
  • September 11, 2024

You can use the Write Text Document or Append Text Document step to create/update a document with a “.csv” extension.  You would want to construct the row to be added in the csv by concatenating variables with double quotes and commas as delimiters as part of building a string to write the new row.  I usually add a new row at the end of the string if we are going to write multiple rows.

Here is a quick example using the Expression Builder…

“\” + GetVariableValue("Column1") + “\”,\”” + GetVariableValue("Column2") + "\”\r\n"