Format Action: format
The format action in the Excel Handler Function is used to apply a specific date format to a column in an Excel sheet. This ensures consistency in date presentation, making it easier to process and analyze date-related data.
Note: Ensure that the file being used is not open during the Case execution to avoid errors or conflicts.
Example: You need to format the JoiningDate column in the EmployeeData.xlsx file on the EmployeeDetails sheet to display dates in the mm/dd/yyyy format.
Steps to Configure:
- Add a new step.
- Select Set a Variable Value from the Action dropdown.
- Enter a variable name in the Element Key field (e.g., FormattedDates). This variable will store the file path of the updated Excel file.
- Click on Form, select Functions, and choose EXCEL Handler Functions from the dropdown.
- In the Cmd field, select format and provide the following parameters:
- FPath: Enter the full path of the Excel file to be formatted (e.g., C:\Reports\EmployeeData.xlsx).
- Column Name: Specify the column to format (e.g., JoiningDate).
- Sheet Name: Enter the name of the sheet containing the column (e.g., EmployeeDetails).
- Sheet Number: Specify the sheet number in the file (e.g., 1).
- Date Format: Provide the desired date format (e.g., MM/dd/yyyy or dd-MM-yyyy).
- Click Save.


Outcome on execution:
- The action applies the specified date format to the JoiningDate column in the EmployeeDetails sheet.
- The data is stored in the variable defined in the Element Key field for use in subsequent steps.
- This variable can be referenced in subsequent steps of the automation process using the syntax ${VariableName} (e.g., ${FormattedDates}).