Forum Discussion
New Agent Experience - Adding Excel Tool
Hello everyone,
I want an agent in the new Copilot Studio experience to read the latest row from an Excel table and then append a new row.
Has anyone successfully configured the Excel Online (Business) tools dynamically in the new Copilot Studio experience? Which values should be passed for Location, Document Library/Drive, and File, etc.?
In preview, the agent fails but when I prompt it, it ends up adding the row. If anyone could also guide me to resources to learn about how to configure tools in the new experience, I would even be more grateful.
Thank you !
2 Replies
- AdhonaiKOUKACopper Contributor
Hi,
For Excel Online (Business), use:
- Location = OneDrive for Business or SharePoint Site (depending on where the file is stored)
- Document Library = usually Documents
- File = workbook path
- Table = an actual Excel Table (Table1, Orders, etc.)
I've also seen cases where the test pane reports a failure even though the row is successfully created. If you need to read the latest row and then insert a new one, I'd recommend wrapping the logic inside an Agent Flow/Power Automate flow and exposing it as a single action to the agent. It tends to be more reliable than calling multiple Excel actions directly.
Hope that helps! 👍
- CoralieSimonaireTin Contributor
Hello,
Here are the documented values for the Excel Online (Business) connector in Copilot Studio (https://learn.microsoft.com/en-us/connectors/excelonlinebusiness/):
Location : me (user's OneDrive), a SharePoint site URL, users/UPN, or groups/groupId
Document Library : name of the document library (e.g. Documents)
File : path relative to the Drive (e.g. MyFile.xlsx or SubFolder/MyFile.xlsx)
Reading the last row : there's no native "get last row" action. If your table has a sortable column (date, ID), use List rows present in a table with $top=1 and $orderby.
Otherwise you'll need to retrieve all rows and take the last one note the default limit is 256 rows.
Use Add a row into a table (AddRowV2).
Regarding the failure in preview : the docs explicitly state that some capabilities from the classic experience are not yet available in the new agent experience, which may explain the inconsistent behavior you're seeing...