WriteText

The WriteText component writes text to document files such as text and MS Word files.

Screenshot

Ports

The WriteText component exposes the Control In, Control Out, Data In, and Data Out ports by default.

Port Description
ControlIn Must be connected to the Control Out port of one or more components.
ControlOut Can be connected to the Control In port of another component or the default end component.
Data In The WriteText component exposes the following Data In ports:
Data (string): specifies the text to write to the document.
FilePath (string): specifies the location of the file to which data is written.
Append(Boolean): specifies if the data should be appended to the existing text in the file. By default, the Boolean data type value is “False”. Therefore, the existing data is overwritten.If you want to append the new data, you can change the default Boolean value to “True”.

Properties

To edit the properties of the WriteText component, in the lower-right pane, change the required property. You can edit the following properties.

Property Description
Search Search for the respective property.
Delay After Execution Specifies the wait time (in seconds) after the action is performed.
Delay Before Execution Specifies the wait time (in seconds) before the action is performed.

Example

Let us consider an example

Screenshot

To write text to a file:

  1. Open Internet Explorer and type https://intellibot.io
  2. In the Toolbox, expand Actions.
  3. Drag the GetText component and drop it on the Design surface.
  4. To select the text to extract, Screenshot click.
     The Press “CTRL+SHIFT” for selection message is displayed.
  5. Press CTRL+SHIFT.
     The mouse pointer becomes a crosshair.
  6. Select the webpage content to extract.
     The selected content is displayed in the GetText component.
  7. In the Toolbox, expand Utilities and then expand Data Writer.
  8. Drag the WriteText component and drop it on the Design surface.
  9. To specify the text to write to the file, double-click the data box and enter the required text.
  10. To specify the file location, double-click the FilePath box and enter the required file path.

    Note

    You can override the existing data source for both the data and the FilePath Data In ports.
    To override the existing data source:

    • Right-click the required Data In port.
    • Click Override and change the data source.
      To learn more about overriding the data source of the data port, refer the Override section.

  11. To override the default Boolean value of the Append data port, if required:

    • Right-click the Append box.
    • Click Override.
      The PORT PROPERTIES dialog box is displayed.
    • In ReadDataFrom, select Static.

    Note

    In ReadDataFrom, you can select Connection or Variable instead of Static.
    To learn more about the Connection or Variable data source override options, refer the Override section.

    • In Static Value, click the drop-down arrow and select “False”.
    • Click OK.
      The Design surface displays the process flow.
  12. Connect all the control ports in the activity.

  13. In the toolbar, click Run.
    The text input is written to the specified file.