Skip to content

Auto Size Action: autoSize

The autoSize command is used to automatically adjust the width of columns in an Excel sheet to fit the content. This ensures improved readability and a professional appearance of the data.

Note: Ensure that the file being used is not open during the Case execution to avoid errors or conflicts.

Example: You have an Excel file, employeeData.xlsx, with a sheet named HR Records. The column data is not fully visible due to mismatched widths, and you want to apply the autoSize action to correct this.

Steps to Configure:

  1. Select SET from the Action dropdown.
  2. Enter a variable name in Element Key (e.g., ResizedExcelFile). This variable will store the updated file path after the operation.
  3. Click on Form, select Functions, and choose EXCEL Handler Functions.
  4. In the action field, select autoSize and provide the following parameters:
    • fPath: Specify the path of the Excel file (e.g., C:\CompanyData\employeeData.xlsx).
  5. Click Save.
v7_excel_file_op_autoSize_list_view
List View
v7_excel_file_op_autoSize_grid_view
Grid View

Outcome on execution:

  • The command automatically adjusts the widths of all columns in the sheet HR Records.
  • If the operation is successful, it returns true, which is stored in the variable defined in the Element Key field (e.g., ResizedExcelFile).
  • If the operation fails (e.g., file not found or insufficient permissions), it returns false.
  • This variable can be referenced in subsequent steps of the automation process using the syntax ${VariableName} (e.g., ${ResizedExcelFile}).

Last updated: Oct 7, 2025
Back To Top