UiPath Documentation
activities
latest
false
Productivity activities

Read Range

Read Range activity that reads a range of cells from a LibreOffice Calc spreadsheet into a DataTable.

UiPath.LibreOfficeCalc.Activities.ReadRange

Note:

The LibreOffice Calc activities package is available in preview.

Description​

Reads a range of cells from the specified spreadsheet into a DataTable.

This activity reads a range of cells from a LibreOffice Calc spreadsheet and returns the data as a System.Data.DataTable. You can specify the range in A1 notation, for example, A1:C10, or leave it empty to read the entire used range.

In Values mode, each cell in the resulting DataTable keeps the type it has in the spreadsheet, so a single column can hold values of different types, and empty cells are returned as DBNull.

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 read from, 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 cell range to read in A1 notation. Supports rectangles, for example, A1:C10, single cells, for example, C3, whole columns, for example, A:C, and whole rows, for example, 1:8. If empty, the entire used range is read.
  • Has headers - Whether the first row in the range is a header row. Select True or False. By default, this option is set to True. When set to False, each column is named after the spreadsheet column it comes from, following the start column of the range. For example, reading B1:D5 produces the columns Column B, Column C, and Column D.
Note:

For more details on the plus menu options, see Designing automations.

Properties panel​

Options​
  • What to read - Indicates what to return from the cells. Select one of the following options:
    • Values - Returns the computed cell results. Formulas are evaluated. This is the default option.
    • Formula and values - Returns the formula for cells that contain one, and the value for all other cells. In this mode every cell is returned as text, with formulas kept exactly as they are written in the spreadsheet, for example, =SUM(A1:A5).
  • Password - The password to open a password-protected spreadsheet file. Leave empty for unprotected files.
Output​
  • Read range - The DataTable containing the data read from the range.
  • Description​
  • Project compatibility​
  • Configuration​
  • Properties panel​

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated