HTML to Word Document StepLast Updated: 07/19/2016 Introduced in Verision: 2.0
This tutorial shows how to use Html To Word Document step. This step can be found under Data > Html category in the ToolBox in the Flow Designer. This step can be used to convert Html Document into Microsoft Word Document.
For this example we created a simple Html Document that looks like following in the Internet Browser.
The Html code for this Document as follows:
We begin in the Designer Folder with clicking Create Flow button from Folder Actions panel.
Next, we Name our Flow and click Create to proceed to the Flow Designer.
In the Flow Designer we use Flow Designer Wizard to add Html To Word Document step to our Flow. We expand All Steps [Catalog] > Data > Html category, select Html To Word Document step and click Add.
Next, we add Show Form step to Done outcome from the Html To Word Document step. We locate Show Form step in the Flow Designer Wizard under Favorite Steps category. This Form will have Download File control for user to be able to download converted File.
In the resulting pop-up window we Name our Form and click Create to proceed to the Form Designer.
In the Form Designer we drag Button control from Actions category in the ToolBox to the workspace, and rename this control to Done. Next, we add File Download control from File Handling category to the workspace.
We configure our File Download control as following… We provide its Data Name with Name, Select its Type as Button, and provide this control with Text that will be shown on this control.
Our Form Design should look as following. When finished, we can Save the Form and close Form Designer to return back to the Flow Designer.
Back in the Flow Designer we use Flow Designer Wizard to connect our Form to the [End Step]…
Next, we select Html To Word Document step in our Flow, and use Step Information Layer to map the Data to this step. First, we select Constant Mapping type for the File Name, and type desirable File Name in the Value box. Mention, that we use .docx file extension in the File Name value.
Next, we select Constant Mapping type for the HTML field, and input Html code into the Value field.
Then, we select our Show Form step in the Flow and map Data to this step using Step Information Layer. For the File field we use Select Value Mapping type. Next, we use Value Picker to map this Value to the Doc File outcome from the Html To Word Document step.
Finally, we connect Failed outcome from the Html To Word Document step to the End Step in our Flow. This completes our Flow Design. We can click Debug Flow on the Top Panel of the Flow Designer to test our Flow.
Note that in Decisions version 3.5 and higher, you’ll need to click Test Flow to access the Debugger.
Our Form opens in the Debugger and we click Download File control to download converted File…
Next, we confirm that we want to save the File…
Select location for the File, Name it and Save.
Decisions informs us that the File was Saved…
We click Done button on our Form in the Debugger to close the Form.
In the Debugger Diagram we can observe that our Flow ran to the End Step with no errors.
We locate and open our Converted File… Confirm that the File looks the same as when it was opened with Internet Browser.