Converting CSV to an Excel File

Last Updated: 08/11/2016 Introduced in Verision: 2.0
 
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.

Example

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 the Flow Designer.

nameFlow

 

Select a Convert Csv To Excel component from the Flow Designer’s start-up window, fro All Steps [Catalog] > Data > List > Excel and CSV category. Click Add to add this step to the workspace.

 

 flowStarts

To configure this component, click on the Convert CSV to Excel step and select the Show Mapping Editor link in the Properties panel.

showMappingForConvert

 

Next, map the inputs. For input, select a mapping type of Constant and click the Value selector.

inputConstant

 

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 both skipBlankLines 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.
 mappingForConverterFinnished
 
 
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 the Toolbox panel. All it contains is a File Download button, configured as follows:
 formPreview
 
 
 
Once the form is placed in the workspace, connect the outcome paths of the flow. To configure our form step, we will click the Show Mapping Editor link in the Properties panel.
showMappingToForm
 

In the Mapping Editor, map ConvertCsvToExcel1_Output to text and click OK to close the Mapping Editor.

mappingForForm

 

This completes our example flow. To see it in action, click the Debug Flow link at the top of the window.

Note that in Decisions version 3.5 and above, you’ll need to click on Test Flow to access the Debugger.

3.5 Test Flow Shot

 

In the debugger, under the Form tab, click the Download Excel File button.
runningDebugger
 
 

In the resulting Save As pop-up, we will provide a name for the new Excel file and click Save.

saveFile

 

An alert will notify us that the new file was saved to the local machine.

fileSaved

 

Under the Diagram tab, we will see that flow completed successfully.

debuggerDiagram

 

Additional Resources