Microsoft Excel 365 Action Block
What it does: Read, write, and manage data in Microsoft Excel workbooks stored in OneDrive or SharePoint as part of your workflow automation.
In simple terms: Automate spreadsheet operations -- read rows, append data, update cells, and manage worksheets and tables in Excel 365 workbooks.
When to Use This
Use the Excel 365 action when you need to:
- ✅ Append new rows to a tracking spreadsheet automatically
- ✅ Read data from Excel for use in workflow logic
- ✅ Update specific rows based on matching criteria
- ✅ Manage worksheets and tables programmatically
- ✅ Use Excel as a lightweight database for workflow data
Example: When a new order is placed, append a row to the Orders spreadsheet with order details and update the inventory count in another worksheet.
Features
- OAuth2 Authentication: Secure Microsoft identity platform connection
- Row Operations: Read, append, update, and clear rows in worksheets
- Worksheet Management: Get, add, and delete worksheets
- Table Support: Work with structured Excel tables (read, append, lookup)
- Workbook Discovery: List available workbooks in OneDrive
- Variable Support: Use workflow variables for dynamic cell references and values
Setup
1. Connect Your Microsoft Account
- Click Connect Microsoft Account in the block settings
- Sign in with your Microsoft 365 account
- Grant the requested permissions (Files.ReadWrite.All)
- Your account will be linked securely via OAuth2
2. Configure Settings
- Select the desired Action from the dropdown
- Choose the Workbook from your OneDrive or enter its ID
- Select the Worksheet or Table to operate on
- Fill in action-specific fields (range, values, etc.)
Excel workbooks must be stored in OneDrive or SharePoint to be accessible through this block. Local Excel files on your computer are not supported.
Supported Actions
Row Operations
| Action | Description |
|---|---|
| Read Rows | Read data from a specified range or entire worksheet |
| Append Rows | Add new rows to the end of a worksheet or range |
| Update Rows | Modify existing rows based on range or criteria |
| Clear Rows | Clear content from a specified range |
Worksheet Operations
| Action | Description |
|---|---|
| Get Worksheets | List all worksheets in a workbook |
| Add Worksheet | Create a new worksheet in the workbook |
| Delete Worksheet | Remove a worksheet from the workbook |
Table Operations
| Action | Description |
|---|---|
| Get Table Rows | Read all rows from a named table |
| Get Table Columns | Retrieve column definitions from a table |
| Append Table Rows | Add new rows to a named table |
| Lookup Table | Search for rows matching specific criteria |
Workbook Operations
| Action | Description |
|---|---|
| Get Workbooks | List all Excel workbooks in your OneDrive |
Using Variables
You can use workflow variables in any Excel field:
Cell Values for Append:
Column A: {{order.id}}
Column B: {{customer.name}}
Column C: {{order.total}}
Column D: {{date.now}}Range Reference:
Sheet1!A1:D{{row.count}}Lookup Value:
{{search.productSku}}Response Mapping
Map results from Excel actions to workflow variables:
Available Values (Read Rows):
- Rows: Array of row data with column values
- Row Count: Number of rows returned
- Range: The actual range that was read
Available Values (Append/Update):
- Updated Range: The range that was modified
- Rows Affected: Number of rows changed
Available Values (Lookup Table):
- Matching Rows: Array of rows matching the criteria
- Match Count: Number of matches found
Example Mapping:
Rows → {{excel.rows}}
Row Count → {{excel.rowCount}}
First Row Name → {{excel.rows[0].Name}}Common Use Cases
1. Order Tracking Spreadsheet
Trigger: New order webhook Excel Action: Append Table Rows
Workbook: Sales Tracker.xlsx
Table: Orders
Order ID: {{order.id}}
Customer: {{order.customerName}}
Amount: {{order.total}}
Date: {{date.now}}
Status: New2. Inventory Lookup
Trigger: Stock check request Excel Action: Lookup Table
Workbook: Inventory.xlsx
Table: Products
Lookup Column: SKU
Lookup Value: {{request.sku}}Then use {{excel.matchingRows[0].Quantity}} in subsequent workflow steps.
3. Monthly Report Aggregation
Trigger: Schedule (1st of each month) Excel Action: Read Rows, then Add Worksheet
Read from: Sales Data!A1:F1000
New Worksheet Name: Summary {{date.previousMonth}}
Write aggregated totals to new worksheet4. Employee Directory Update
Trigger: HR system webhook Excel Action: Lookup Table, then Update Rows
Lookup: Employee ID = {{employee.id}}
Update Fields:
Department: {{employee.newDepartment}}
Title: {{employee.newTitle}}
Updated: {{date.now}}Best Practices
Data Structure
- ✅ Use Excel Tables (not raw ranges) for structured data -- they auto-expand and support named columns
- ✅ Keep header rows consistent and descriptive
- ✅ Use ISO date formats (YYYY-MM-DD) for date columns
- ✅ Avoid merged cells in ranges that workflows interact with
Performance
- ✅ Read only the range you need, not entire worksheets
- ✅ Batch row appends when possible instead of one-at-a-time
- ✅ Use Lookup Table instead of reading all rows and filtering in the workflow
- ✅ Keep workbooks under 5 MB for optimal API performance
Data Integrity
- ✅ Validate data types before writing to cells
- ✅ Use the Lookup action to check for duplicates before appending
- ✅ Clear ranges carefully -- this operation cannot be undone via the API
- ✅ Consider using worksheet protection for critical data columns
Troubleshooting
Cannot Find Workbook
Check:
- The workbook is stored in OneDrive or SharePoint (not locally)
- Your Microsoft account has access to the file
- Use Get Workbooks action to list all available workbooks
Append Rows Fails
Solutions:
- Ensure the target worksheet or table exists
- Verify that the number of values matches the number of columns
- Check that data types match column formats (numbers, dates, text)
Read Returns Empty Data
Check:
- The range reference is correct (e.g.,
Sheet1!A1:D100) - The worksheet name matches exactly (case-sensitive)
- The workbook is not locked or checked out by another user
Table Lookup Returns No Matches
Check:
- The lookup column name matches the table header exactly
- The lookup value format matches the cell format (text vs. number)
- Leading/trailing whitespace in cell values can cause mismatches
Limitations
- Workbook Size: Large workbooks (>5 MB) may experience slower API responses
- Row Limits: Excel 365 supports up to 1,048,576 rows per worksheet, but API operations on very large ranges may time out
- Concurrent Access: Multiple workflows writing to the same workbook simultaneously may cause conflicts
- Formulas: Appended data is written as values; cell formulas cannot be set through this block
- API Rate Limits: Microsoft Graph API throttling applies
Tip: For high-volume data operations, consider using a proper database instead of Excel. Excel works best as a lightweight data store for under 10,000 rows.
Related Blocks
- OneDrive: Manage the workbook files themselves
- SharePoint: Access Excel files in SharePoint document libraries
- Google Sheets: Alternative spreadsheet integration
- Condition: Add logic based on Excel data lookups
- Loop: Iterate over rows returned from Excel