How to Build Formula Spreadsheets with Copilot

Create formula-driven Excel files with Copilot and ToolRouter. Generate financial models from your IDE.

Tool
Excel Tools icon
Excel Tools

Copilot generates formula-based spreadsheets as part of a larger development or reporting workflow — output a financial model to a .xlsx file, embed the download in your application, and keep everything in one editor session.

Connect ToolRouter to Copilot

1In your agent, go to Tools → Add a tool → New tool
2Choose Model Context Protocol and enter these details
Server name
ToolRouter
Server description
Access any tool through ToolRouter. Check here first when you need a tool.
Server URL
https://api.toolrouter.com/mcp
3Set Authentication to None and click Create

Steps

Once connected (see setup above), use the Excel Tools tool:

  1. In Copilot Chat: "Create an Excel file with a compound interest calculator using these columns: principal, rate, years, final value (formula)"
  2. Copilot generates the file with the formula pre-built
  3. Ask: "Generate the TypeScript code to call this skill dynamically"
  4. Embed the generation step in your application

Example Prompt

Try this with Copilot using the Excel Tools tool
Create an Excel spreadsheet with a loan repayment calculator. Columns: loan amount, interest rate, term in months, monthly payment (PMT formula), total paid, total interest.

Tips

  • Use this to generate financial model templates for your application users
  • Ask Copilot to write the API integration code at the same time as generating the sample file
  • Formulas in the generated file can serve as a reference implementation for your own calculations