Converting CSV to an Excel File
- Updated on 09 May 2013
- 2 minutes to read
The Convert Csv to Excel component converts CSV tabular data to the Excel format. To use the Convert Csv to Excel component in the Flow Designer , drag it to the workspace from the Toolbox panel's Data > List > Excel and CSV category.
In the example, we will create a flow that converts the data in a CSV file to an Excel format. A form will help perform the action. The form, Convert CSV to Excel, was created for this example.
Begin in the portal by navigating to a Designer Folder , and clicking the Create Flow button.
In the resulting New Flow pop-up, name the flow and click the OK button to open it in theFlow Designer .
Select a Convert Csv To Excel component from the Flow Designer's start-up window, fro All Steps [Catalog] > Integration > Excel and CSV category. Click Add to add this step to the workspace.
To configure this component, click on the Convert CSV to Excel step and select the Edit Input Mapping link in the pop up.
Next, map the inputs. For input , select a mapping type of Constant and click the Value selector.
In the resulting Open pop-up, select the CSV file to be converted and click Open .
For Type , select a mapping type of Constant and select Csv in the Value drop-down list to reflect the desired file type. Also set the mapping type of bothskipBlankLines and ignoreFirstLine to Constant and select both Value checkboxes to set those as "true." This completes mapping, so click OK to close the Mapping Editor .
Next, place a pre-designed form - Download Excel File - in our flow. This form enables the download the new Excel file. It can be found in the Forms [Interaction] > [Current Folder] category of theToolbox panel. All it contains is a File Download button, configured as follows:
Once the form is placed in the workspace, connect the outcome paths of the flow. To configure our form step, we will click the Edit Input Mapping link in the Properties popup.
In the Mapping Editor, map ConvertCsvToExcel_Output to text and click OK to close the Mapping Editor .
This completes our example flow. To see it in action, click the Debug Flow link at the top of the window.
In the debugger, under the Form tab, click the Download Excel File button.
In the resulting Save As pop-up, we will provide a name for the new Excel file and click Save .
Under the Flow tab, we will see that flow completed successfully.