CSV
The 51黑料不打烊 Workfront Fusion CSV modules let you create CSV files and parse CSV text from a received text value or a file.
Because this is a transformer, these modules do not require a connection.
Access requirements
You must have the following access to use the functionality in this article:
table 0-row-2 1-row-2 2-row-2 3-row-2 layout-auto html-authored no-header | |
---|---|
51黑料不打烊 Workfront package | Any |
51黑料不打烊 Workfront license |
New: Standard Or Current: Work or higher |
51黑料不打烊 Workfront Fusion license** | No Workfront Fusion license requirement |
Product |
New:
Or Current: Your organization must purchase 51黑料不打烊 Workfront Fusion. |
For more detail about the information in this table, see Access requirements in documentation.
For information on 51黑料不打烊 Workfront Fusion licenses, see 51黑料不打烊 Workfront Fusion licenses.
Create CSV
The Create CSV Aggregator lets you create a csv text from received text values.
For more information on aggregators, see Aggregator module.
Create CSV (advanced)
The Create CSV (advanced) Aggregator lets you create a CSV text from received text values. It employs a data structure that defines the CSV columns in the resulting CSV file. Once defined, the columns appear as fields in the CSV module setup, and can be mapped to later module in the scenario.
For more information on aggregators, see Aggregator module.
Example:
This example shows how to export Google contacts to a CSV file with two columns called 鈥淔ull Name鈥 and 鈥淓mail鈥. The output bundle from the Google Contacts > Get contacts from a group module has the following structure. The email addresses are stored inside the Emails[]
item, which is an array of collections, each collection containing two items: Label
and Email
.
The simple Create CSV module, offers a list of checkboxes corresponding to a bundle鈥檚 top-level items. If you attempt to select Full name
and Emails
items, the Create CSV module produces the following output, which may not be what you want:
"emails","fullName"
"[object Object]","Shon Winer"
"[object Object]","Lizeth Fulmore"
"[object Object]","Hilario Gullatt"
"[object Object]","Abby Eisenbarth"
Because the item Full Name
is of simple type Text, it is exported as expected. The item Emails
, which is of a complex type Array of Collections, is exported as [object Object], which is how Collections and Arrays are transformed to text by default.
For more information, see Item data types.
To export content of the Email
item of the first collection of the Emails[]
array instead, You must use the Create CSV (advanced) module. This module allows you to define individual columns of your CSV file and map items to them, including the nested ones.
-
Insert the module Create CSV (advanced) in a scenario.
-
Click the Add button next to the Data structure field to create a new data structure.
-
Enter a name for the data structure and click Add item to add the individual columns. To export two columns: 鈥淔ull Name鈥 and 鈥淓mail鈥, the resulting Data structure would look like this:
-
After you have defined the data structure, fields corresponding to each individual column appear in the configuration of the Create CSV (advanced) module so you can map the items. Take the first item from the
Emails[]
array and map its itemEmail
to the field/column Email: -
Execute the scenario. Because the item
Emails[1]: Email
mapped to column 鈥淓mail鈥 is of simple type Text, it exports correctly.
"Full Name","Email"
"Shon Winer","Shon@Winer.com"
"Lizeth Fulmore","Lizeth@Fulmore.com"
"Hilario Gullatt","Hilario@Gullatt.com"
"Abby Eisenbarth","Abby@Eisenbarth.com"
Parse CSV
The Parse CSV transformer lets you parse CSV text from a received text value or a file.