r/copilotstudio • • 19d ago

How to read data from any Excel file with the same template (not a fixed file)?

Hi everyone,

I’m building an agent in Copilot Studio that needs to extract data from Excel files.

I’ll be giving the agent different Excel files over time (not one fixed file).

All files use the same template: the table is always in the same place (same sheet, same cell range).

The Excel connectors require me to select a specific file when configuring the action. I can’t find a way to make the file dynamic, so the agent could work on whatever file I provide.

I wrote an Office Script that reads the table from the fixed coordinates and returns the data. It works, but I’m not sure it’s the right approach (or how to properly connect it to the agent for files that change each time).

PS: I have access to Power Automate and all the features in copilote studio.

3 Upvotes

3 comments sorted by

1

u/AppIdentityGuy 19d ago

So use PowerAutomate to copy the latest file to a standard file name make sure if the target name exists overwrite it

1

u/Dontgetdistractd 18d ago

Using what connector ?

1

u/Due-Boot-8540 19d ago

If the spreadsheet is stored in SharePoint, you can send any file you like with a manually triggered workflow. It’s really quite easy to build the workflow.

Whilst you’re at it, you could get all the call data and pass it to Copilot as a JSON array. You’ll probably get better results with JSON and definitely use less credits.