# Set Range Formatting

> Set Range Formatting activity that applies formatting to a range of cells in a LibreOffice Calc spreadsheet.

`UiPath.LibreOfficeCalc.Activities.SetRangeFormatting`

:::note
The **LibreOffice Calc** activities package is available in preview.
:::

## Description

Applies font, fill, alignment and number formatting to a range of cells. Formatting that is not set is left unchanged.

You can provide a whole **Formatting** object to set a baseline, and then override individual members using the specific properties. This is useful for reusing the output of the **Get Cell Formatting** activity while adjusting a few attributes.

A property you leave empty does not override the baseline, and if you set no formatting at all, the activity makes no change.

:::note
This package requires LibreOffice to be installed, and runs on Windows x64 or macOS 13.3 or later on Apple Silicon.
:::

## Project compatibility

Windows | Cross-platform

## Configuration

You can configure the activity and its properties as follows:

* **File path** - The path to the spreadsheet file (`.ods`, `.xlsx`, `.csv`). The field also accepts a file resource through the **Use resource file** option in the plus menu, which replaces this field with **Resource file**. When the activity is placed inside a **Use Spreadsheet Document** scope, this field is replaced by **Spreadsheet document**, which is bound to the document opened by the scope.
* **Sheet** - The name of the sheet to format, for example, `Sheet1`. The field lists the sheets found in the selected file, and you can also type a name or an expression.
* **Range** - The range to format in A1 notation, for example, `A1:C10`. A single cell, for example, `B2`, is also accepted.
* **Formatting** - The formatting to apply, as a single object. Optional — the individual properties below override its members when set.

:::note
For more details on the plus menu options, see [Designing automations](https://docs.uipath.com/studio/standalone/latest/user-guide/designing-automations).
:::

### Properties panel

#### Font
* **Font name** - The font family, for example, `Calibri`. The field lists the fonts installed on the machine, and you can also type a name or an expression.
* **Font size** - The font size in points.
* **Bold**, **Italic**, **Strikethrough** - Select **True** or **False** for each.
* **Underline** - The underline style to apply, from none through single, double, dashed, and wavy variants.
* **Font color** - The color applied to the text. The field lists named colors, and you can also type an expression. A **Font color (hex)** alternative accepts a hex string, for example, `#FF0000`.

#### Fill
* **Background color** - The cell background (fill) color. The field lists named colors, and you can also type an expression. A **Background color (hex)** alternative accepts a hex string, for example, `#FFFF00`.

#### Alignment
* **Horizontal alignment** - Specifies how content is horizontally aligned in the cells, including a **Repeat** option that fills the cell width by repeating the content. Defaults to **Standard**, the default alignment for the content type.
* **Vertical alignment** - Specifies how content is vertically aligned in the cells. Defaults to **Standard**.
* **Wrap text** - Select **True** or **False**.

#### Number format
* **Category** - The number-format category to apply, using that category's standard format for the document locale.
* **Format code** - A custom number format code, for example, `0.00`, applied instead of a category.

#### Options
* **Password** - The password to open a password-protected spreadsheet file. Leave empty for unprotected files.
