ByteChef LogoByteChef

Microsoft Excel

Microsoft Excel is a spreadsheet program used for organizing, analyzing, and visualizing data in tabular form.

Categories: Productivity and Collaboration

Type: microsoftExcel/v1


Connections

Version: 1

OAuth2 Authorization Code

Properties

NameLabelTypeDescriptionRequired
clientIdClient IdSTRINGtrue
clientSecretClient SecretSTRINGtrue
tenantIdTenant IdSTRINGtrue

Connection Setup

Create OAuth 2.0 Application

Creation of OAuth 2.0 application is documented here.

Grant Necessary Permissions

  1. Open the Azure Portal: https://portal.azure.com/
  2. Click on App registrations.
  3. Click on All applications.
  4. Click on application you want to connect to Microsoft Excel.
  5. Click on API permissions.
  6. Click on Microsoft Graph (1).
  7. Select following scopes:
    • Files.ReadWrite
    • offline_access
  8. After selecting all the scopes click on Update permissions

Actions

Append Row

Name: appendRow

Append a row of values to an existing worksheet.

Properties

NameLabelTypeDescriptionRequired
workbookIdWorkbook IDSTRINGThe ID of the workbook.true
worksheetNameWorksheetSTRING
Depends On workbookId
The name of the worksheet.true
isTheFirstRowHeaderIs the First Row Header?BOOLEAN
Options true, false
If the first row is header.true
rowDYNAMIC_PROPERTIES
Depends On isTheFirstRowHeader, worksheetName, workbookId
true

Example JSON Structure

{
  "label" : "Append Row",
  "name" : "appendRow",
  "parameters" : {
    "workbookId" : "",
    "worksheetName" : "",
    "isTheFirstRowHeader" : false,
    "row" : { }
  },
  "type" : "microsoftExcel/v1/appendRow"
}

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

Find Workbook ID

To find the Workbook ID, click here.

Find Worksheet Name

To find the Worksheet name, click here.

Clear Worksheet

Name: clearWorksheet

Clear a worksheet of all values.

Properties

NameLabelTypeDescriptionRequired
workbookIdWorkbook IDSTRINGThe ID of the workbook.true
worksheetNameWorksheetSTRING
Depends On workbookId
The name of the worksheet.true
isTheFirstRowHeaderIs the First Row Header?BOOLEAN
Options true, false
If the first row is header.true

Example JSON Structure

{
  "label" : "Clear Worksheet",
  "name" : "clearWorksheet",
  "parameters" : {
    "workbookId" : "",
    "worksheetName" : "",
    "isTheFirstRowHeader" : false
  },
  "type" : "microsoftExcel/v1/clearWorksheet"
}

Output

This action does not produce any output.

Find Workbook ID

To find the Workbook ID, click here.

Find Worksheet Name

To find the Worksheet name, click here.

Delete Row

Name: deleteRow

Delete row on an existing sheet.

Properties

NameLabelTypeDescriptionRequired
workbookIdWorkbook IDSTRINGThe ID of the workbook.true
worksheetNameWorksheetSTRING
Depends On workbookId
The name of the worksheet.true
rowNumberRow NumberINTEGERThe row number to delete.true

Example JSON Structure

{
  "label" : "Delete Row",
  "name" : "deleteRow",
  "parameters" : {
    "workbookId" : "",
    "worksheetName" : "",
    "rowNumber" : 1
  },
  "type" : "microsoftExcel/v1/deleteRow"
}

Output

This action does not produce any output.

Find Workbook ID

To find the Workbook ID, click here.

Find Worksheet Name

To find the Worksheet name, click here.

Find Row by Number

Name: findRowByNum

Get row values from the worksheet by the row number.

Properties

NameLabelTypeDescriptionRequired
workbookIdWorkbook IDSTRINGThe ID of the workbook.true
worksheetNameWorksheetSTRING
Depends On workbookId
The name of the worksheet.true
isTheFirstRowHeaderIs the First Row Header?BOOLEAN
Options true, false
If the first row is header.true
rowNumberRow NumberINTEGERThe row number to get the values from.true

Example JSON Structure

{
  "label" : "Find Row by Number",
  "name" : "findRowByNum",
  "parameters" : {
    "workbookId" : "",
    "worksheetName" : "",
    "isTheFirstRowHeader" : false,
    "rowNumber" : 1
  },
  "type" : "microsoftExcel/v1/findRowByNum"
}

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

Find Workbook ID

To find the Workbook ID, click here.

Find Worksheet Name

To find the Worksheet name, click here.

Update Row

Name: updateRow

Update a row in an existing worksheet.

Properties

NameLabelTypeDescriptionRequired
workbookIdWorkbook IDSTRINGThe ID of the workbook.true
worksheetNameWorksheetSTRING
Depends On workbookId
The name of the worksheet.true
rowNumberRow NumberINTEGERThe row number to update.true
isTheFirstRowHeaderIs the First Row Header?BOOLEAN
Options true, false
If the first row is header.true
updateWholeRowUpdate Whole RowBOOLEAN
Options true, false
Whether to update the whole row or just specific columns.true
rowDYNAMIC_PROPERTIES
Depends On workbookId, worksheetName, isTheFirstRowHeader, updateWholeRow
true

Example JSON Structure

{
  "label" : "Update Row",
  "name" : "updateRow",
  "parameters" : {
    "workbookId" : "",
    "worksheetName" : "",
    "rowNumber" : 1,
    "isTheFirstRowHeader" : false,
    "updateWholeRow" : false,
    "row" : { }
  },
  "type" : "microsoftExcel/v1/updateRow"
}

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

Find Workbook ID

To find the Workbook ID, click here.

Find Worksheet Name

To find the Worksheet name, click here.

Triggers

New Row

Name: newRow

Triggers when a new row is added.

Type: POLLING

Properties

NameLabelTypeDescriptionRequired
workbookIdWorkbook IDSTRINGThe ID of the workbook.true
worksheetNameWorksheetSTRING
Depends On workbookId
The name of the worksheet.true
isTheFirstRowHeaderIs the First Row Header?BOOLEAN
Options true, false
If the first row is header.true

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

JSON Example

{
  "label" : "New Row",
  "name" : "newRow",
  "parameters" : {
    "workbookId" : "",
    "worksheetName" : "",
    "isTheFirstRowHeader" : false
  },
  "type" : "microsoftExcel/v1/newRow"
}

Find Workbook ID

To find the Workbook ID, click here.

Find Worksheet Name

To find the Worksheet name, click here.

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.


Additional Instructions

How to find Workbook ID

Via API

Use the GET https://graph.microsoft.com/v1.0/me/drive/items/root/search(q='.xlsx') endpoint.

How to find Worksheet Name

To find a Worksheet Name, open the workbook. Below the worksheet you will find a bar with worksheet names.

How is this guide?

Last updated on

On this page