The Microsoft 365 Excel package provides a set of actions you can use to automate tasks in the online version of Microsoft Excel, directly through a web browser using Microsoft 365. Use this package to build bots that read, write, format, and manage Excel workbooks, worksheets, cells, rows, columns, and tables.
When to use this package
Automation 360 includes three packages for Microsoft Excel automation. Choose the package that matches your environment:
| Your Excel environment | Recommended package |
|---|---|
| No Microsoft Excel installed on the bot device | Excel basic package |
| Desktop version of Microsoft Excel installed | Excel advanced package |
| Microsoft Excel accessed via web browser (Microsoft 365) | Microsoft 365 Excel package |
Some of the use cases of Microsoft 365 Excel package are:
- Read data from online Excel workbooks and write it to databases, other files, or applications
- Automate report generation by creating and populating workbooks with data from other systems
- Clean and format spreadsheet data, such as delete rows, insert columns, apply cell colors and formatting
- Loop through rows in a data table to process records in bulk
- Retrieve specific cell values, formulas, or ranges to drive downstream automation logic
- Manage multiple worksheets, such as create, rename, hide, copy, and switch between sheets
- Automate table operations such as creating, filtering, and retrieving table data
- The Microsoft 365 Excel package works only with workbooks stored in OneDrive or a OneDrive-connected folder. The workbook file must be accessible from the OneDrive path you specify in the Open action.
- All session names are case-sensitive. Use the same session name consistently across the Connect, Open, and all subsequent actions in your bot.
- To use actions from other Microsoft 365 packages (such as Calendar or OneDrive) in the same bot, establish a separate connection using the Connect action from that package.
- Worksheet names cannot exceed 31 characters and cannot contain the characters \ / ? * [ ].
Actions in the Microsoft 365 Excel package
You can use the actions in the Microsoft 365 Excel package to perform the following operations:
| Operations | Description |
|---|---|
| Connect | Using Connect action in Microsoft 365 Excel package |
| Cell | Cell operations in Microsoft 365 Excel |
| Row and column | Column/Row operations in Microsoft 365 Excel |
| Table | Table operations in Microsoft 365 Excel |
| Workbook | Workbook operations in Microsoft 365 Excel |
| Worksheet | Worksheet operations in Microsoft 365 Excel |
Example workflow
Your bot needs to open a monthly sales workbook, read data from a specific worksheet, delete outdated rows, and save the result.
- Drag the Connect action.
- In the Session name field, enter
ExcelSession1. - Drag the Open action.
- In the File path field, enter
OneDrive/Reports/SalesReport.xlsx. - In the Session name field, enter
ExcelSession1. - Drag the Switch to sheet action.
- Select
May2025by name. - Drag the Delete row or column action.
- Under Row Operations, select Delete row
by and enter
51:55to delete rows 51 through 55 - Drag the Get cell action.
- Enter
B3for Cell name under Specific cell - Assign output to a String variable
TotalSales - Drag the Close action to exit the workbook.
- Drag the Disconnect action to end the session.
Result: The bot removes stale data from the worksheet and captures the summary value for use in the next step of the automation.