How to Share an Excel VBA Workbook Online Without Allowing Downloads
Question details
The user wants to share an Excel workbook containing VBA macros and confidential pricing formulas online, restricting downloads to prevent users from accessing hidden sheets and proprietary logic.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Sharing an interactive calculator or pricing workbook online with external users or entry-level employees without exposing the underlying formulas.
- Observed behavior
- Excel for the web cannot run VBA macros, and built-in worksheet protection is insufficient for hiding confidential data from users who can open and view the file.
Understand that native spreadsheet protection features are designed to prevent accidental edits, not to serve as robust security against intentional data extraction.
Transition to a Server-Side Web Application
Because Excel cannot securely hide underlying formulas from viewers, migrating your sensitive logic to a custom web app is the only secure method.
Excel for the web does not support VBA execution, and any user who can view a workbook online may find ways to inspect hidden sheets or formulas.
To completely protect proprietary pricing logic, you should separate the user interface from the calculation engine rather than relying on spreadsheet file protection.
Determine exactly which data fields the user needs to input and what final results they are permitted to see.
Create a secure front-end interface, such as a custom web portal or a secure form, where users can submit their input parameters.
Move the confidential formulas and VBA logic to a secure server-side script or database that calculates the result and returns it to the user without exposing the underlying method.

Share Static Results with Blocked Downloads
If building a custom web application is not feasible, restrict data exposure by sharing only the calculated results instead of the interactive workbook.
Try WPS Office for Secure Document Management
While no spreadsheet software can perfectly hide internal formulas in an interactive online viewer, WPS Office offers a free, highly compatible, and robust desktop alternative for managing complex VBA workbooks, encrypting local files, and securely exporting static reports.
- 1. Download the installer: Visit the official WPS Office website to download the free installation file for your operating system.
- 2. Install the software: Run the installer and follow the on-screen instructions to quickly set up WPS Office on your device.
- 3. Open your workbooks: Launch WPS Spreadsheet to open your existing Excel workbooks and seamlessly continue your secure local document management.

Frequently Asked Questions
Can Excel for the web run VBA macros?
No, Excel for the web does not support executing VBA macros. Users must open the workbook in the desktop version of Excel to use macro-enabled features.
Is Excel worksheet protection secure enough to hide confidential formulas?
No, Excel's worksheet and workbook protection features are primarily meant to prevent accidental changes. They are not strong security measures and can often be bypassed by users determined to view hidden sheets.
How can I prevent users from downloading my shared Excel file on OneDrive?
When creating a sharing link, access the link settings, uncheck 'Allow editing', and toggle the 'Block download' option. This prevents users from downloading, printing, or copying the file, though they can still view the content in their browser.




