Set column width for a range

更新时间:
复制 MD 格式

1. Introduction

Note

Prerequisites: Start Excel or Get Opened Excel

This component sets the column width for a range of cells.

2. Input parameters

Note

See the help for each input item in the component panel of the application flow editor.

3. Output parameters

Note

For help with each output, see the component panel of the ROS Visual Editor.

4. Component usage example

4.1. Component configuration example

  1. For Opened Sheet Object, select v_Sheet_obj_1, which is the object returned by the Get Active Sheet or Activate Sheet component.

  2. Set Start Column of Range to "A".

  3. Set End Column of Range to "B".

  4. Set Method to "Autofit to content".

  5. Default Values for Advanced Options

4.2. Result

None

5. Sample flow

Setup flow

  1. Use the Start Excel component to open a specific Excel file.

  2. Use the Get Active Sheet component to retrieve the active sheet object.

  3. Use the Set Row Height for a Range component to autofit the row height to the content in a specific range.

  4. Use the Set Column Width for a Range component to autofit the column width to the content in a specific range.

Result

After the flow runs, the column width for the specified cell range is automatically adjusted to fit the content.