Skip to main content
Let’s learn how to connect Engini to Microsoft Excel 365. This integration connects Engini workflows with Excel workbooks stored in OneDrive or SharePoint, allowing you to read worksheet data, add named ranges and charts, and call any other Excel feature through the Microsoft Graph API. With the Microsoft Excel 365 activities in Engini you can:
  • Find workbooks and get their details
  • Open and close workbook sessions
  • List, get, add, update and delete worksheets
  • Read, update and sort ranges
  • List, create, update, sort and filter tables, and add, list and delete their rows and columns
  • List and add named items
  • List, add and update charts, and get chart images
  • Find the drives of Microsoft 365 groups and SharePoint sites
  • Send any other request to the Microsoft Graph API

Add a Connection to Microsoft Excel 365 in Engini

Prerequisites

  • A Microsoft 365 account with access to the workbooks you want to use, in OneDrive or SharePoint.

Connecting Engini to Microsoft Excel 365

  1. Enter your Engini account at https://app.engini.io.
  2. Navigate to the Connections page by clicking on Connections in the left sidebar or by clicking here. Engini — Connections page
  3. Click on the “New Integration” option located at the top bar. Engini — New Integration button
  4. Choose the Microsoft Excel 365 option from the available applications. Microsoft Excel 365 — Choose Application
  5. Enter the following details in the “New Integration” form and press Save: Microsoft Excel 365 — New Integration form
  6. Connection Name - Enter a name for the connection.
  7. Email - The Microsoft account email associated with the connection.
  8. Access Token - The access token used by the Microsoft connection.
  9. Refresh Token - The refresh token used to renew access.
  10. Sign in with Microsoft - Sign in with the Microsoft account you want Engini to use.
  11. Save - Save the connection.
Engini sends the access token with every request made through this connection, so you don’t need to add it to any action.

Before you start: workbook fields

Most Microsoft Excel 365 actions point at a workbook with the same fields:
  • Drive ID - The drive that holds the workbook. Click the empty field to open the tooltip, then choose the drive, for example My Drive for your own OneDrive.
  • Workbook Item ID - The ID of the workbook file in that drive. Enter it, or map the ID returned by a previous step such as Get Workbook.
  • Session ID - Optional. Leave it blank unless you work with a workbook session.

Actions

Get Workbook

Retrieves the details of a workbook file, such as its ID, name, size and web link. Use it to find the Workbook Item ID that the other actions need. Microsoft Excel 365 — Get Workbook action
  • OneDrive Location - Click the empty field to open the tooltip, then choose where the workbook is stored: My Drive, Site Drive or Group Drive.
After you choose a location, select the folder, then the workbook. The Workbook list shows the Excel files in the selected folder. For My Drive, the drive is selected automatically and isn’t shown. For Group Drive, select the group and its drive before the folder.

Get Workbooks

Retrieves the workbooks stored in a OneDrive or SharePoint location. Microsoft Excel 365 — Get Workbooks action
  • OneDrive Location - Click the empty field to open the tooltip, then choose where the workbooks are stored.
After you choose a location, the Query field appears. Enter text to search for in the file names. For Site Drive, also enter the Site ID, and for Group Drive, the Group ID.

Create Workbook Session

Opens a workbook session. Use the returned session ID in the Session ID field of other actions, and close the session with Close Workbook Session. Microsoft Excel 365 — Create Workbook Session action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Persist Changes - The field shows true, which saves the changes made in the session to the workbook. Enter false to discard the changes when the session ends.

Close Workbook Session

Closes a workbook session that was opened with Create Workbook Session. Microsoft Excel 365 — Close Workbook Session action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - The ID of the session to close, returned by Create Workbook Session.

List Worksheets

Retrieves all the worksheets of a workbook, with each worksheet’s ID, name, position and visibility. Microsoft Excel 365 — List Worksheets action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.

Get Worksheet

Retrieves the details of a worksheet, such as its ID, name, position and visibility. Microsoft Excel 365 — Get Worksheet action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
After you fill in the Workbook Item ID, the Worksheet ID or Name field appears.

Add Worksheet

Adds a new worksheet to a workbook. Microsoft Excel 365 — Add Worksheet action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
  4. Name - Optional. The name of the new worksheet. If left blank, Excel gives the worksheet a default name.

Update Worksheet

Updates the name, position or visibility of a worksheet. Microsoft Excel 365 — Update Worksheet action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
  4. Name - The new name of the worksheet.
  5. Position - The position of the worksheet among the workbook’s tabs, counted from 0 for the first tab.
  6. Visibility - Click the field to open the tooltip, then choose Visible, Hidden or VeryHidden.
After you fill in the Workbook Item ID, the Worksheet ID or Name field appears.

Delete Worksheet

Deletes a worksheet from a workbook. Microsoft Excel 365 — Delete Worksheet action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
After you fill in the Workbook Item ID, the Worksheet ID or Name field appears.

Get Range

Retrieves the values, formulas and formatting details of a range of cells in a worksheet. Microsoft Excel 365 — Get Range action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
After you fill in the Workbook Item ID, the Worksheet ID or Name field appears, and after you choose the worksheet, the Range Address field appears.

Update Range

Writes values, formulas or number formats to a range of cells in a worksheet. Microsoft Excel 365 — Update Range action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
  4. Values - The values to write, as rows. Each row is a list of values, for example [["A1","B1"]].
  5. Formulas - The formulas to write, as rows. Each row is a list of formulas, for example [["=SUM(A1:A2)"]].
  6. Number Format - The number formats to apply, as rows. Each row is a list of formats, for example [["General"]].
After you fill in the Workbook Item ID, the Worksheet ID or Name field appears, and after you choose the worksheet, the Range Address field appears. Note: Fill in Values, Formulas and Number Format. Leaving one of them empty causes the action to fail.

Sort Range

Sorts the used range of a worksheet (the area that contains data or formatting) by one or more columns. Microsoft Excel 365 — Sort Range action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
  4. Add Field - Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, click here.
After you fill in the Workbook Item ID, the Worksheet ID or Name field appears. All of the following are added through Add Field:
  • Sort Fields - Required. Click Add Sort Field to add a sort field for each column you want to sort by. Each sort field has:
    • Column Index - The position of the column to sort by, counted from 0 for the first column.
    • Ascending - Whether to sort the column in ascending order.

List Tables

Retrieves all the tables in a workbook. Microsoft Excel 365 — List Tables action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.

Create Table

Creates a table from a range of cells. Microsoft Excel 365 — Create Table action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
  4. Range Address - The range the table covers, including the worksheet name, for example Sheet1!A1:D8. The table is added to the worksheet in the address.
  5. Has Headers - Click the empty field to open the tooltip, then choose True if the first row of the range holds the column headers, or False.

Update Table

Updates the name, header row, total row or style of a table. Microsoft Excel 365 — Update Table action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
  4. Name - The new name of the table.
  5. Show Headers - Click the empty field to open the tooltip, then choose whether the table shows its header row.
  6. Show Totals - Click the empty field to open the tooltip, then choose whether the table shows its total row.
  7. Style - The table style, for example TableStyleMedium4.
After you fill in the Workbook Item ID, the Table ID or Name field appears.

Sort Table

Sorts the rows of a table by one or more columns. Microsoft Excel 365 — Sort Table action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
  4. Add Field - Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, click here.
After you fill in the Workbook Item ID, the Worksheet ID or Name field appears, and after you choose the worksheet, the Table ID or Name field appears. All of the following are added through Add Field:
  • Sort Fields - Required. Click Add Sort Field to add a sort field for each column you want to sort by. Each sort field has:
    • Column Index - The position of the column to sort by, counted from 0 for the first column.
    • Ascending - Whether to sort the column in ascending order.

List Table Rows

Retrieves the rows of a table. Microsoft Excel 365 — List Table Rows action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
After you fill in the Workbook Item ID, the Table ID or Name field appears.

Add Table Row

Adds one or more rows to a table. Microsoft Excel 365 — Add Table Row action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
  4. Values - The rows to add. Each row is a list of cell values, for example [["Jan",49,37]].
  5. Insert At Index - Optional. The position of the new row in the table, counted from 0. Leave it empty to add the row at the end.
After you fill in the Workbook Item ID, the Table ID or Name field appears.

Delete Table Row

Deletes a row from a table. Microsoft Excel 365 — Delete Table Row action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
After you fill in the Workbook Item ID, the Table ID or Name field appears, and after you choose the table, the Row Index field appears. Enter the position of the row to delete, counted from 0 for the first row of the table.

List Table Columns

Retrieves the columns of a table, with each column’s ID and name. Microsoft Excel 365 — List Table Columns action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
After you fill in the Workbook Item ID, the Table ID or Name field appears.

Add Table Column

Adds a column to a table. Microsoft Excel 365 — Add Table Column action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
  4. Name - The name of the new column.
  5. Values - The values of the new column, one row per entry. The first entry is the column header, followed by the cell values, for example [["Status"],["Open"]].
  6. Insert At Index - Optional. The position of the new column in the table, counted from 0. Leave it empty to add the column at the end.
After you fill in the Workbook Item ID, the Table ID or Name field appears.

Delete Table Column

Deletes a column from a table. Microsoft Excel 365 — Delete Table Column action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
After you fill in the Workbook Item ID, the Table ID or Name field appears, and after you choose the table, the Column ID or Name field appears.

Filter Table Column

Applies a filter to a column of a table. Microsoft Excel 365 — Filter Table Column action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
  4. Add Field - Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, click here.
After you fill in the Workbook Item ID, the Worksheet ID or Name field appears, after you choose the worksheet, the Table ID or Name field appears, and after you choose the table, the Column ID or Index field appears. All of the following are added through Add Field:
  • Criteria - Required. The filter conditions to apply to the column. Criteria shows Filter On; click Add Criteria Field to add the other fields:
    • Filter On - Required. The type of filter: custom to filter by the conditions in Criterion 1 and Criterion 2, or values to keep only the values listed in Values.
    • Criterion 1 - The first condition, for example =2.
    • Operator - How Criterion 1 and Criterion 2 are combined: and or or.
    • Criterion 2 - The second condition.
    • Values - The values to keep when Filter On is values.

Clear Table Filter

Clears the filter applied to a column of a table. Microsoft Excel 365 — Clear Table Filter action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
After you fill in the Workbook Item ID, the Worksheet ID or Name field appears, after you choose the worksheet, the Table ID or Name field appears, and after you choose the table, the Column ID or Index field appears.

List Named Items

Retrieves the named items defined in a workbook, such as named ranges, with each item’s name, value and scope. Microsoft Excel 365 — List Named Items action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.

Add Named Item

Adds a named item, such as a named range, to a workbook. Microsoft Excel 365 — Add Named Item action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
  4. Name - The name to define, for example Sales_Totals.
  5. Reference - The range the name refers to, as a formula, for example =Sheet1!AA1:CC5.
  6. Comment - Optional. A free-text comment saved with the name.

List Charts

Retrieves the charts in a worksheet. Microsoft Excel 365 — List Charts action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
After you fill in the Workbook Item ID, the Worksheet ID or Name field appears.

Add Chart

Adds a chart to a worksheet, based on the data in a range. Microsoft Excel 365 — Add Chart action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
  4. Chart Type - Click the field to open the tooltip, then choose the type of chart, for example ColumnClustered, Line or Pie.
  5. Source Data - The range the chart plots, for example A1:C4.
  6. Series By - Click the field to open the tooltip, then choose how the data is split into series: Auto, Columns or Rows.
After you fill in the Workbook Item ID, the Worksheet ID or Name field appears. Choose the worksheet the chart is added to.

Update Chart

Updates the name, size or position of a chart. Microsoft Excel 365 — Update Chart action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Session ID - Optional. Leave it blank unless you work with a workbook session.
  4. Name - The new name of the chart.
  5. Height - The height of the chart, in points.
  6. Width - The width of the chart, in points.
  7. Left - The distance of the chart from the left edge of the worksheet, in points.
  8. Top - The distance of the chart from the top edge of the worksheet, in points.
After you fill in the Workbook Item ID, the Worksheet ID or Name field appears, and after you choose the worksheet, the Chart ID or Name field appears.

Get Chart Image

Retrieves an image of a chart. Microsoft Excel 365 — Get Chart Image action
  1. Drive ID - Select the drive that holds the workbook.
  2. Workbook Item ID - Enter the ID of the workbook.
  3. Width - The width of the image, in pixels. The field shows 0, which uses the default size.
  4. Height - The height of the image, in pixels. The field shows 0, which uses the default size.
  5. Fitting Mode - Click the field to open the tooltip, then choose how the chart fits the image: fit, fitandcenter or fill.
  6. Session ID - Optional. Leave it blank unless you work with a workbook session.
After you fill in the Workbook Item ID, the Worksheet ID or Name field appears, and after you choose the worksheet, the Chart ID or Name field appears.

List Groups

Retrieves the Microsoft 365 groups in your organization. Use it to find the group whose drive holds your workbook. Microsoft Excel 365 — List Groups action
  1. Filter - Optional. A filter that narrows down the groups, for example groupTypes/any(c:c eq ‘Unified’) to return Microsoft 365 groups only.
  2. Select - Optional. A comma-separated list of the group properties to return, for example id,displayName.
  3. Top - Optional. The maximum number of groups to return per page.

Get Group’s Drive Id

Retrieves the drives of a Microsoft 365 group, with each drive’s ID and name. Use the drive ID to work with a workbook stored in the group’s files. Microsoft Excel 365 — Get Group's Drive Id action
  • Group ID - Click the empty field to open the tooltip, then choose the group, or map the group ID returned by a previous List Groups step.

Get Site’s Drives

Retrieves the drives (document libraries) of a SharePoint site, with each drive’s ID and name. Use the drive ID to work with a workbook stored on the site. Microsoft Excel 365 — Get Site's Drives action
  • Site ID - Click the empty field to open the tooltip, then choose the SharePoint site.

Send API Request

This activity allows you to send a custom API request directly to the Microsoft Graph API. Use it for Excel features that the actions above don’t cover. Microsoft Excel 365 — Send API Request action
  1. Base Url - The root URL of the Microsoft Graph API (https://graph.microsoft.com/v1.0). It is filled in from your Microsoft Excel 365 connection and can’t be edited here.
  2. Relative url - You can specify additional path segments or parameters that need to be added to the end of the Base Url. This allows you to customize the specific request you want to perform. For example, /me/drive/items/{workbook-id}/workbook/worksheets lists the worksheets of a workbook in your OneDrive.
  3. Method - Select the HTTP method (e.g., Get, Post, Put, Delete, Patch). The default is POST.
  4. Body Type - Defines the format of the data in the body of your request. The default, application/json, means the body contains a JSON-formatted payload.
  5. Body - Contains any data that is being sent to the server.
  6. Add Headers - Additional metadata about the request, such as the type of data the Engini can accept, the length of the request body, and authentication information.
  7. Add Queries - The query refers to the parameters or data that are included in the URL of an HTTP request to provide additional information or instructions to the server.
Engini adds your connection’s access token to every request as an Authorization header, so you don’t need to add it to the headers. For the full list of endpoints, see the Microsoft Graph Excel API reference.