Activities
latest
false
Banner background image
Productivity Activities
Last updated Apr 26, 2024

Write Row

UiPath.MicrosoftOffice365.Activities.Excel.WriteRowConnections

Description

Write a row in a selected Excel file using an Array Row or a Data Row. You can map individual fields to target columns using the Individual Fields option under Data Row.

Scopes

This activity requires the following scopes:

  • Sites.ReadWrite.All

Project compatibility

Windows | Cross-platform

Configuration

  • Microsoft Outlook 365 connection - The connection for the Microsoft 365 account to use in the activity.
  • Workbook - The Excel workbook to use. The method to specify the folder to be retrieved: Folder picker, Enter Id, Enter Url.
    • Workbook sample - The workbook template to use. The field is visible after clicking Use workbook template. Browse the OneDrive folders and select a workbook. In Studio Desktop, the option is available from the See more button menu next to Range type. To learn more, see Working with templates.

    • File/Folder picker option: Click the Folder docs image icon to browse the OneDrive or SharePoint files/folders and select a spreadsheet. This option accepts input as IResource.
      • Use the See more button menu to use a variable or select the Reload Folder Picker option if you've modified your folders and need to retrieve the latest data.

    • Enter Id option:

      • Workbook Id - The ID of the workbook of interest. This property supports String variables and string formatted values.
      • SharePoint site address - The URL of the SharePoint site that contains the file or folder. This property supports String variables and string formatted values. Open your SharePoint site in a browser and copy its URL, e.g., https://yourcompany.sharepoint.com/sites/ProductOfficial.
      • SharePoint document library - The document library within the indicated SharePoint site that contains the file or folder. This property supports String variables and string formatted values. Open the Documents tab in your SharePoint site and copy the URL, e.g., https://yourcompany.sharepoint.com/sites/ProductOfficial/Shared%20Documents/Forms/AllItems.aspx.
    • Enter Url option:

      • Workbook Url - The URL of the workbook of interest. This property supports String variables and string formatted values. Retrieve the URL by opening the file in a browser.
  • Range - The range to write in. You can write custom ranges using full A1 notation. This field is prepopulated with information retrieved from the selected workbook or workbook sample. This property supports String variables and string formatted values.
    • Select the Update Ranges option if you've modified your sheets and need to retrieve the latest data.

    • Select the Update Fields option if you've modified your workbook and need to retrieve the latest data.

  • How to write - Specifies how to add the data to the specified range. The available options are:
    • Overwrite - Overwrites any previous data that exists. Writes the row in the exact place. If a range with multiple cells is selected, writes on the first row.
      • Row Position - The row index position where the activity overwrites the row. The index can be used from iterating on the range rows using Read Range or For Each Row. Starts from 0.
    • Append - Indicates how to add the data to the indicated range. Writes the data in the first empty row found and inserts a new row by shifting cells down.
      Note: Appending data does not currently support named ranges.
    • Insert - Inserts a row and writes in the newly inserted row.
      Note: If Has Headers is set to True, the first row in the range is considered the header and the row position 0 is the next row.
  • What to write - The data in a DataTable that will be written in a workbook. The available options are:
    • Data Row - Use a Data Row as input data.
    • Array row - Use an Array Row as input data.
    • Individual Fields - Map data to individual target fields. Using individual fields, you write directly in the specified columns. The columns which are not specified aren't cleared and keep the old data.
  • Data Row to write / Array Row to Write - The data in a DataRow or ArrayRow that will be written in the workbook.
  • Has headers - If selected, the column headers are generated by reading the range header. This property supports Boolean values. Default option is Off. This field is displayed if you select the What to write - Individual Fields option.
  • Manage Target Individual Columns - Select additional fields for the current object. This field is displayed if you select the What to write - Individual Fields option.
Note:

Batching API calls is supported for this activity when used inside: For Each Email, For Each Row in Workbook, For Each File or Folder.

Known limitation

An error occurs if you use Write Row/Write Range with the Append option and the destination range is a sheet that contains an empty table at the beginning (with no other data). The activity tries to insert a row in the sheet, at the start of the table, but Graph API returns an error.

Example



  • Description
  • Project compatibility
  • Configuration
  • Known limitation
  • Example

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.