"File is corrupted" or prompt to repair file when opening an Excel spreadsheet


When I open an Excel spreadsheet or use it as a template, a message displays that the spreadsheet file or macro-enabled spreadsheet is corrupted, or Excel gives a prompt to repair the file. or the spreadsheet does not open.


See also Reverting to a Previous Version.

Spreadsheets not uploaded correctly via OneDrive

This can be caused where, in the past, spreadsheets have not been uploaded correctly via OneDrive. Having a file that has not been uploaded correctly can cause issues with other documents.

This is a Microsoft error. Refer to the Microsoft article https://support.microsoft.com/en-us/topic/files-needing-attention-faq-5c944ab8-1dd5-44f3-9dc6-9cd35846f8ab

With OneDrive, the upload can be an issue with macro-enabled spreadsheets, especially where the spreadsheets are large or include references to other spreadsheets or where it uses pivot tables.


The following is the recommended best practice to avoid this issue and needs to be performed on each computer that is having the issue:

  • Ensure your computer is correctly configured to work offline with FYI including OneDrive. Refer to Configuring your OneDrive for use with FYI.

  • In the relevant Office application (Word, Excel or PowerPoint) check if there are any Files Needing Attention. Files that have failed to upload need to be removed.

    1. Open the relevant Office application (Word, Excel or PowerPoint).
    2. In File - Open, check for any files in that application that are showing as Files Needing Attention. Refer to the Microsoft article Files Needing Attention FAQ.
    3. From Files Needing Attention, you can open the file and re-save, or, you can discard the changes completely.
    4. Try editing a document again.

    Note: Office Upload Center has now been depreciated and replaced with the Files Needing Attention function in the relevant Office application.

Important Note: For all of the following possible solutions, check with your IT consultants or department that it is OK to do so before changing these settings.

  • Ensure trusted locations, and documents on your network are enabled in Excel.
    a) Open Excel and select File - Options - Trust Center
    b) Click Trust Center Settings.
    c) Go to Trusted Locations.
    d) Checkmark Allow Trusted Locations on my network.
    e) Uncheckmark Disable all Trusted Locations.
    f) Click OK.

  • Allow documents on a network to be trusted
    In Excel File - Options - Trust Center - Trust Center Settings.
    a) Click Trusted Documents.
    b) Checkmark Allow documents on a network to be trusted.
    c) Click OK.

  • Enable Macros
    This setting is your choice, if you are using macros (note that macros do not work in Excel online)
    In Excel File - Options - Trust Center - Trust Center Settings.
    a) Click Macro Settings.
    b) Select Enable all macros.
    c) Click OK.

  • Turning off protected views
    Check with your IT consultants or department that it is OK before changing these settings. Refer also to this Microsoft article regarding the protected view https://support.microsoft.com/en-us/office/what-is-protected-view-d6f09ac7-e6b9-4495-8e43-2bbcdbcb6653

    In Excel File - Options - Trust Center - Trust Center Settings.
    a) Click Protected View.
    b) Remove all checkmarks to disable all Protected View
    c) Click OK.

   Return to Causes

OneDrive is corrupting macro-enabled spreadsheets


Where the spreadsheet is macro enabled, it is being corrupted by OneDrive.

The corruption is not coming from FYI. It is happening within OneDrive and this is a Microsoft issue.

There are multiple reports of this error across the web, including this example in a thread on a Microsoft forum: https://answers.microsoft.com/en-us/msoffice/forum/all/onedrive-repeatedly-corrupting-macro-enabled/385043f9-4d1d-4502-89da-f3ee3c92f8d7


In the thread in the link above, the Microsoft moderators suggest the following:

  • "Transfer the contents across to a new file."
    Note: For FYI, If the file is used in FYI as a template, also transfer it to a new template.

  • "Turn off auto-save, so the user can control the saving."
    Note: For FYI, Turning off auto-save can cause implications as you may lose data if you have an issue with your computer. This is not something that FYI would generally recommend. Therefore we recommend you only turn AutoSave "Off" on macro-enabled spreadsheets.

    When using Excel desktop, you use the AutoSave toggle in the top left-hand corner of the spreadsheet to set this to "Off" or "On".

Please note this may not help in every instance given that OneDrive is corrupting the files and FYI does not know about it.

   Return to Causes

Reverting to a Previous Version

If there are issues with a spreadsheet getting corrupted, FYI has the following functionality which give you the ability to revert to a previous version:

  • Separate versions are automatically maintained within FYI.
  • Versions are created whenever a user stops editing a file (with the I am finished editing button)
  • In the document drawer, users can access the earlier versions and restore an older version and set it as the current version.

For details on versions in FYI, refer to Version History and Creating a New Document Version.

   Return to Causes

Contact Support

Please also contact the FYI Support Team to advise of a corruption issue.

Was this article helpful?
2 out of 6 found this helpful