Skip to main content
Solved

API to update csv?

  • September 6, 2024
  • 1 reply
  • 45 views

mshealy
Digital Collaborator
Forum|alt.badge.img+11
  • Digital Collaborator
  • 103 replies

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"

 

 

View Original
Is this content helpful?

1 reply

Scott Brooks
Conversation Starter
Forum|alt.badge.img+4
  • Conversation Starter
  • 7 replies
  • 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"