How to remove the prompt "The file format and extension of 'abcd.afoxls' don't match. The file could be could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?"

Mel Calucin 81 Reputation points
2022-04-13T17:40:29.207+00:00

This is in reference to question: "How to launch Excel file in SharePoint 365 as a separate instance by default"

https://learn.microsoft.com/en-us/answers/questions/808646/how-to-launch-excel-file-in-sharepoint-365-as-a-se.html

Just in case there is no solution, I'm developing an alternative:

  1. Rename my Excel xslx files in SharePoint to have the extension afoxls. Example, abcd.xlsx becomes abcd.afoxls
  2. Create a .NET application "AFO Launcher" that will take the afoxls file as a parameter.
  3. Do a file association of the files with extension afoxls to use the "AFO Launcher" application.
  4. When the "AFO Launcher" application runs with the abcd.afoxls file as a parameter, it will spawn off the following call.
    "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" /x abcd.afoxls
  5. The /x option is to tell Excel to create a new instance instead of running in an existing instance.

I think this would work since I tried out running the following in the command prompt and I see two Excel instances being created.

"C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" /x abcd.afoxls
"C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" /x abcd2.afoxls

The only problem is that every time I open the afoxls file I get the following prompt.

"The file format and extension of 'abcd.afoxls' don't match. The file could be could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?"

Is there a way to configure Excel to to give this prompt?

Is there an alternative solution to this?

Thanks.

Regards,

Mel Calucin

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,084 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,431 questions
{count} votes

Accepted answer
  1. Tong Zhang_MSFT 8,976 Reputation points
    2022-04-14T06:43:06.307+00:00

    Hi @Mel Calucin ,
    Per my research and test, please follow these steps:

    1.Please go to file, and click "Options":
    192937-image.png

    2.Click Trust Center >> Trust Center Settings:
    192867-image.png

    3.Go to Protected View, then clear all the checkboxes:
    192947-image.png

    4.Finally ,click Ok to save the changes, and restart.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful