Creating and Styling Excel Document
  • 03 May 2021
  • 4 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Creating and Styling Excel Document

  • Dark
    Light

Article summary

Overview

This tutorial demonstrates how to create an Excel Document in the Flow Designer and apply different styling to the Excel Document. 

The following example is available for download:

Example

  1. Begin in a Designer Folder, select CREATE FLOW from the bottom action panel.
  2. Next, select and name the default Flow [Excel Styling] and select CREATE to proceed to the Flow Designer.
  3. In the Flow Designer, add a Create New Excel File step from the All Steps [Catalog] > Integration > Excel and CSV category. 
  4. Select the Create New Excel File step, under Inputs, give the new excel file a Constant File Name and Sheet Name
  5. Add a Set Values In Row step from the All Steps [Catalog] > Integration > Excel and CSV category in the Steps panel. 
  6. For File Type, select Constant as the mapping type and choose Excel_xlsx from the drop-down menu. Rows in this step are zero-indexed.
    In this example, set the values for the first row and first column of the Excel Document, so input "0" as the value for the column and row field.
  7. For Fields Start With Equals Are Formulae choose Constant as the mapping type and set this value to True
  8. For New Values, set the input mapping to Constant and input First Name, Last Name, and Email Address.
  9. For Input File, set the input mapping to Select From Flow and select the output from Create New Excel File step.
  10. For Worksheet Number, set the input mapping to Constant and enter a relevant worksheet number, if working with a document that has multiple worksheets.
  11. For Inputs > Input File, select the file from the Create New Excel File step.
  12. Add a Set Values In Column step from the All Steps [Catalog] > Integration > Excel and CSV category in the Steps panel. 
  13. For Inputs > file Type, select Constant as the mapping type and choose Excel_xlsx from the drop-down menu. Rows in this step are zero-indexed. 
  14. For Worksheet Number, input a relevant worksheet number if working with a document with more than one worksheet.
  15. Set the values for the first column and second row of the Excel Document, so input "1" as the Column and Row field value. 
  16. For Fields Start With Equals Are Formulae choose Constant as the mapping type and set this value to True.
  17. For Inputs > input, select the file from the Create New Excel File step.
  18. Next, apply some styles for the Excel Document. Expand All Steps [Catalog] > Integration > Excel and CSV > Styling category and add Set Font Size step to the Flow.
  19. Under Settings, set Throw Error if Null is Not Expected to False (uncheck the checkbox). 
  20. Under Inputs > File Type, select Constant as the mapping type and choose Excel_xlsx from the drop-down menu. Rows in this step are zero-indexed. 
  21. Increase the font size of the first row in the first column. Input "0" as the value for the column and row field. 
  22. For Font Size, choose Constant as the mapping type and set this value to "100".
  23.  For Inputs > File, select the file from the Create New Excel File step. 
  24. Set CSV Separator to Null.
  25. Next, add a Set Background Color step from All Steps [Catalog] > Data > List > Excel and CSV > Styling category. 
  26. Under Settings, set Throw Error if Null is Not Expected to false (uncheck the checkbox). 
  27. Under Inputs > file Type, select Constant as the mapping type and choose Excel_xlsx from the drop-down menu. Rows in this step are zero-indexed. 
  28. Change the background of the cell in the first row, second column. 
  29. Input "1" as the value for the Constant column and input "0" as the row field's value.
  30.  For Color, choose Constant as the mapping type and choose a color to change the background.
  31.  For Inputs > File, select the file from the Create New Excel File step. 
  32. Set CSV Separator to Null.
  33. Add a Set Font Color step from All Steps [Catalog] > Data > List > Excel and CSV > Styling category. 
  34. Under Settings, set Throw Error if Null is Not Expected to false (uncheck the checkbox). 
  35. Under Inputs > File Type, select Constant as the mapping type and choose Excel_xlsx from the drop-down menu. Rows in this step are zero-indexed.
  36. Change the font color of the cell in the first row, third column. 
  37. Input "2" as the value for the Constant column and input "0" as the row field's value. 
  38. For Color, choose Constant as the mapping type and choose a font color. 
  39. For Inputs > File, select the file from the Create New Excel File step.
  40.  Set CSV Separator to Null.
  41. Add an Update File With Data step from All Steps [Catalog] > Integrations > Excel and CSV category in the Steps panel. 
    Every time changes are made to the Excel File in the Flow, it will need to be updated.
  42. For Inputs > File Type, select Constant as the mapping type and choose Excel_xlsx from the drop-down menu. 
  43. For Inputs > Input, select the file from the Create New Excel File step.
  44. Lastly, add a Form component to the Flow for the user to download the updated Excel Document.
  45. Add a Show Form step from the Favorite Steps category in the Steps panel.
  46. In the resulting window, name the Form and select CREATE to proceed to the Form Designer.
  47. This Form has two controls on it. First, a Button control from the Actions category. Then, a File Download component from the File Handling category.
  48. File Download components Data Name is "New File" and the File OutputType is FileData.

  49. Back in the Flow Designer, map data for the Show Form step. 
  50. Under Inputs > New Files, select the output from the Update File with Data step.

Debug

  1. From the Flow Designer, select Debug on the top action bar.
  2. Click FULL.
  3. When the Flow reaches the Form step, click File Download. 

  4. Open the downloaded Excel file to verify that all configured styles were applied to the Excel file.

Was this article helpful?