UiPath Documentation
activities
latest
false
Productivity activities

Format Cells

Format Cells activity that sets the format for all the cells in a specified range in Excel.

UiPath.Excel.Activities.Business.FormatRangeX

Description​

Sets the format for all the cells in a specified range. You can format the data type, alignment, font, fill color, and borders of the cells. The activity can be used with an Excel file selected for a parent Use Excel File activity or with the Project Notebook.

Configuring the activity​

Designer panel​

  • Source - Select Plus on the right side of the field, then, from the menu, select the file and then a sheet, table, or range to format, or select Indicate in Excel to indicate a range directly from the file. Alternatively, you can select Custom Input to enter a sheet name, table name, or range manually, or Open in Advanced Editor to enter a VB expression.
  • Format data as type - Select Set Format to open the Format cells window and then select what to format in the cells using the options at the top: Data Type (number format), Alignment (horizontal, vertical, wrap text), Font (font, font style, underline style, font size, color), Fill (color), or Border (edges, line style, color). Depending on your selection, other options may appear for additional configuration.

Properties panel​

Common​
  • DisplayName - The name displayed for the activity in the Designer panel.
Input​
  • See Source in the body of the activity.
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.

Notes​

  • Border applies to the Top, Bottom, Left, Right, Inside horizontal, and Inside vertical edges, or to the Outline and All presets. The available line styles are None, Thin, Medium, Thick, Dashed, Dotted, Double, and Hair. Borders that you don't set are left unchanged, and None removes the border from the selected edges. Diagonal borders are not supported.
  • If Excel leaves the cells in the General format after a custom number format is applied, the activity fails with an error that names the format and the range.
  • In XAML, the FontOptions, AlignmentOptions, and BorderOptions types are in the UiPath.Excel namespace of the UiPath.Excel assembly. These types require the namespace declaration xmlns:ue="clr-namespace:UiPath.Excel;assembly=UiPath.Excel".
  • Description​
  • Configuring the activity​
  • Designer panel​
  • Properties panel​
  • Notes​

Was this page helpful?

Connect

Need help? Support(opens in new window)

Want to learn? UiPath Academy(opens in new window)

Have questions? UiPath Forum(opens in new window)

Stay updated