Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
9 subscribers
Views
2073 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi, I have requirement to generate a specifically formatted csv file. For
garym
over 9 years ago
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
0
Stefan Helzle
A Score Level 3
over 9 years ago
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###", "")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Stefan Helzle
A Score Level 3
over 9 years ago
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###", "")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data