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
2072 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
0
Tom Ryan
Appian Employee
over 9 years ago
If you haven't seen them already, there are some plugins that might meet your requirement:
forum.appian.com/.../summary
forum.appian.com/.../summary
forum.appian.com/.../summary
If none of these meet your requirements, you will probably need to make your own plugin:
forum.appian.com/.../Custom_Plug-in_Packages.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 9 years ago
Using the smart service "Text Doc from Template" you can write whatever format you need. Just create an expression which returns the text for a single line.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
garym
over 9 years ago
Thanks tom.ryan and stafanh791.
stefanh791 - I have 186 columns in my template. Have you heard of any limitations?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
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