web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Generating Excel, Word...
Copilot Studio
Suggested Answer

Generating Excel, Word documents in Copilot Studio custom built agent

(1) ShareShare
ReportReport
Posted on by 62
Hi All,
 
We have a requirement of Generating Excel, Word documents in Copilot Studio custom built agent.
 
Is it technically feasible to create Excel, Word documents in Copilot Studio agent by using tools in copilot studio.
 
Any suggestions will be appreciated.
 
Regards.
Avinash.
Categories:
I have the same question (0)
  • Suggested answer
    MS.Ragavendar Profile Picture
    6,835 Super User 2026 Season 1 on at
     
    This article from @mdevaney covers how to generate Word and Excel files from Co-Pilot Studio.
     
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
  • AD-01081101-0 Profile Picture
    62 on at
    @MS.Ragavendar Thank you for sharing the article but the challenge is code interpreter feature is currently in preview mode. So we are unable to deploy the solution to production with this preview feature.
  • Nivedipa-MSFT Profile Picture
    Microsoft Employee on at
    Hello ,

    Yes, it's feasible in Copilot Studio, but not out-of-the-box — you need to call an external action to actually generate the file.

    The simplest approach is to use a Power Automate flow as a tool in your agent:

    • For Word, use the "Populate a Microsoft Word template" action with a .docx template containing content controls.
    • For Excel, use a template .xlsx and the "Add a row into a table" / "Update a row" actions, or generate a CSV and convert it.
    • Save the output to SharePoint or OneDrive and return the download link back to the user in chat (Copilot Studio can't send binary files inline).

    If you need more control — complex formatting, charts, pivot tables, or large datasets — build an Azure Function using OpenXML SDK (or ClosedXML / EPPlus for Excel), expose it through a custom connector, and add it as a tool in your agent.

  • Suggested answer
    11manish Profile Picture
    1,922 on at
    Yes, it is technically feasible to generate Excel and Word documents using a Copilot Studio agent, but not directly within the agent itself.
     
    The recommended approach is to use tools such as Power Automate or Azure Functions to generate the documents, store them in SharePoint or OneDrive, and return the file link back to the user through the agent.
     
    Copilot Studio acts as an orchestrator that triggers these backend processes rather than handling document creation natively.
  • Suggested answer
    Valantis Profile Picture
    4,803 on at
     
    Yes, technically feasible but Copilot Studio itself doesn't generate files directly. The agent triggers a Power Automate flow as a tool, the flow does the document generation, and returns a download link to the user.
     
    For Excel: use the Excel Online connector actions in Power Automate to create a workbook, add tables, populate rows from your data source, and save to SharePoint or OneDrive. The flow returns the file URL and the agent sends it to the user.
     
    For Word: Power Automate has a Word Online connector with a "Populate a Microsoft Word template" action. You create a Word template with content controls (placeholders), store it in SharePoint, and the flow fills in the placeholders at runtime with your data and saves the generated document. The agent sends the download link.
     
    For more complex document generation (formatted tables, charts, dynamic layouts), using the Encodian or Plumsail Documents connectors from Power Automate gives you significantly more control than the native Word connector.
    The agent's role is just to collect the inputs from the user (what data to include, what format, etc.), pass them to the flow as parameters, and return the result link. The actual file work happens in the flow.
     
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 704

#2
Vish WR Profile Picture

Vish WR 249

#3
Haque Profile Picture

Haque 244

Last 30 days Overall leaderboard