Resolve False-Positive Virus Detection for Excel XLSM Files in OneDrive
Question details
The user needs to bypass or resolve an issue where an Excel macro-enabled workbook is blocked from uploading due to an incorrect malware detection.

- Product
- Microsoft Excel, OneDrive
- Device & OS
- not provided
- Scenario
- Uploading or sharing an Excel macro-enabled (.xlsm) file containing basic VBA code to OneDrive or SharePoint Online.
- Observed behavior
- Microsoft Defender or built-in OneDrive virus protection incorrectly flags the file as malware, blocking the user from uploading or sharing the document.
Verify that the Excel .xlsm file originates from a trusted source and that the embedded VBA macros do not contain any harmful or obfuscated code before attempting to bypass security warnings.
Submit the File for False-Positive Analysis and Use Alternative Sharing
Report the incorrect malware detection to Microsoft and utilize temporary file-sharing methods while waiting for the security review to clear.
Because OneDrive and SharePoint Online have built-in, mandatory virus scanning, any file flagged by Microsoft Defender will be blocked at the server level. Submitting the file for analysis is the primary way to clear the global block.
Go to the Microsoft Security Intelligence submission portal, sign in with your Microsoft account, and upload the blocked .xlsm file, classifying it as a suspected false positive for security review.
Open your web browser, navigate to your OneDrive account, and attempt to manually upload the file into a designated folder. Note that the upload may still be blocked until the security review is complete.
While waiting for the false-positive clearance, temporarily share the file with your team using a secure email attachment or an approved third-party file-sharing service.
Click the Help or Settings gear icon in the top-right corner of the OneDrive web interface, select 'Feedback', and report the false-positive block to the support team.

Try WPS Office for Your Spreadsheet Needs
If you frequently encounter restrictive security policy errors and false-positive blocks with Microsoft 365, consider switching to WPS Office. It provides a lightweight, highly compatible environment for managing your spreadsheets and macros securely without the upload restrictions often encountered in OneDrive.
- 1. Download and Install WPS Office: Visit the official WPS Office website to download the free installer and complete the quick installation process on your device.
- 2. Open your XLSM file: Launch WPS Spreadsheets, click 'Open', and select your macro-enabled .xlsm file to resume your work instantly.
- 3. Share via WPS Cloud: Use the built-in 'Share' button in the top right corner to generate a secure link and easily distribute your spreadsheet to colleagues.

Frequently Asked Questions
Why is my safe Excel .xlsm file being flagged as a virus?
Excel .xlsm files contain VBA macros, which are executable code. Security scanners like Microsoft Defender sometimes flag safe macros as malicious (a false positive) if the code's behavior or structure resembles known malware signatures.
Can I disable the virus scan in OneDrive to force the upload?
No, Microsoft 365 enforces mandatory virus scanning for all files uploaded to OneDrive and SharePoint Online to protect users. You cannot disable this tenant-wide security feature.
Are there other ways to bypass the SharePoint file block temporarily?
If the file is strictly blocked by OneDrive's scanner, you can try compressing the .xlsm file into a password-protected .zip archive before uploading it. This prevents the scanner from reading the macros during the upload process.
How long does it take for Microsoft to clear a false positive?
Review times vary significantly. It typically takes anywhere from a few hours to a couple of days for the Microsoft Security Intelligence team to analyze the submitted file and update the Defender definition files.




