How to Email an Embedded Excel Worksheet from the Web
Question details
The user wants to create a web-based button that automatically emails an embedded Excel worksheet to specific recipients.

- Product
- Excel for the web
- Device & OS
- not provided
- Scenario
- Attempting to trigger an automated email containing an Excel worksheet directly from a web browser environment.
- Observed behavior
- Excel for the web does not support VBA macros, meaning a standard macro button cannot be used. Power Automate is a potential workaround but may require a specialized Microsoft 365 work or school account.
Ensure you have access to a Microsoft 365 work or school account if you intend to use Power Automate, and verify that your Excel workbook is saved in OneDrive for Business or SharePoint Online.
Use Power Automate to Send the Excel Worksheet
Since VBA is unavailable in Excel for the web, Power Automate is the recommended method for triggering automated emails based on workbook actions.
Power Automate can connect your Excel Online files to Outlook or other email services. You can set up a flow that triggers when a specific action occurs or runs on a schedule.
Log into your Microsoft 365 account, navigate to the app launcher, and select Power Automate.
Click on 'Create' and choose 'Instant cloud flow' to allow users to trigger the email manually, or 'Automated cloud flow' if it should happen after a specific update.
Add an action by searching for 'Send an email (V2)' via Office 365 Outlook. Configure the 'To', 'Subject', and 'Body' fields, and use the 'Attachments' advanced option to link your Excel file from OneDrive or SharePoint.

Share Manually via Excel for the Web
If you do not have access to Power Automate, the simplest alternative is using the built-in sharing features of Excel for the web.
Consult Microsoft Q&A for Custom API Integrations
If standard automation tools do not meet your exact requirements for a web-based button, you may need custom development using the Microsoft Graph API.
Use WPS Office for Advanced Spreadsheet Automation
If Excel for the web restricts your workflow due to missing VBA macro support, consider switching to WPS Office. The WPS desktop suite fully supports VBA, allowing you to easily create automated buttons that email worksheets directly without needing complex web-based automation services.
- 1. Open Your Spreadsheet in WPS: Launch WPS Spreadsheet and open your existing Excel file.
- 2. Use the Built-in Email Feature: Navigate to the 'Menu' at the top left, hover over 'Share', and select 'Email' to instantly attach the worksheet to a new message in your default mail client.
- 3. Automate with VBA: Alternatively, go to the 'Developer' tab to write standard VBA code that links a button directly to an email dispatch function.

Frequently Asked Questions
Can I run VBA macros in Excel for the web?
No, Excel for the web does not support creating, running, or editing VBA macros. If your file contains macros, they will remain intact, but you must open the workbook in the desktop version of Excel or WPS Office to use them.
Do I need a special account to use Power Automate with Excel?
Yes, while a basic version of Power Automate is available to Microsoft accounts, utilizing Excel Online connectors typically requires a Microsoft 365 work or school account stored on OneDrive for Business or SharePoint.
Is there a way to add an HTML button to an embedded Excel sheet?
You cannot inject custom HTML buttons directly into an Excel web embed that execute local scripts. You must either use Office Add-ins, external web application wrappers using the Microsoft Graph API, or Power Automate triggers.




