Hi, I have requirement to generate a specifically formatted csv file. For

Hi,
I have requirement to generate a specifically formatted csv file. For instance, column 1 must be 4 characters, column 2 must be 4 character, column 3 must be 14 characters (and right justified) and so on. There are 186 columns. However, not all columns need to be filled in. We will just have 20 columns that are mandatory and we can populate those columns with data from the process. This means there will be many blank columns but we still need to allocate the spacing for these columns in the csv file because the system that it will be imported to is very specific on the format.
Can anyone suggest a way on how this can be done? I was thinking of some sort of "csv template" and then populate it with data but I don't know if this is do-able. Any suggestions would be appreciated.

Thanks,
Gary

OriginalPostID-176111

OriginalPostID-176111

  Discussion posts and replies are publicly visible

Parents
  • No. In case you have to write huge amounts of data there is one trick I used. You can write the file in a process model loop which calls the Text Doc from Template" node for each line. The trick is to add the placeholder like "###content###" in a new line you line so the smart service "finds" the configured placeholder. Your expression would look something like

    ri!data1 & ";" & ri!data2 & ...... & if(ri!addPlaceholder, char(10)&char(13) & "###content###", "")
Reply
  • No. In case you have to write huge amounts of data there is one trick I used. You can write the file in a process model loop which calls the Text Doc from Template" node for each line. The trick is to add the placeholder like "###content###" in a new line you line so the smart service "finds" the configured placeholder. Your expression would look something like

    ri!data1 & ";" & ri!data2 & ...... & if(ri!addPlaceholder, char(10)&char(13) & "###content###", "")
Children
No Data