ExtensionHardening

sgbreslin

New Member
Hi

Has anyone come across file extension hardening problem in excel? Seems the only way to deal with it is to edit a registry subkey which I don't want to have to do.

Is there any way to get BP to interact with the Microsoft Excel extension warning?

This is the warning message displayed:

"The file you are trying to open, '[filename]', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?" (Yes | No | Help)

Thanks
 
Last edited:

VJR

Well-Known Member
Hi sgbreslin,

Is it an xls file which should be an xlsx file? If so is there a specific reason you do not want to use .xlsx.
When do you get this error? Is it when you use the Open action from Ms Excel VBO. Also can you elaborate more details like if the file is opened/downloaded directly from a webpage or is it a file on a desktop so that some sort of alternative can be thought of.
 

sgbreslin

New Member
The file is downloaded directly from an internal website; after export of the doc and click on Open then the additional popup for the warning is displayed.

After doing some searches the overriding opinion seems to be set a new security registry option within excel to disable, but this in itself is not recommended. I Cant find any code which i could use to handle the message.

Excel ExtensionHardening.png
 
Last edited:

VJR

Well-Known Member
Is it an xls file which should now be an xlsx file? If so is there a specific reason you do not want to use .xlsx.
 

sgbreslin

New Member
I have no control over the type of file used, we simply download it from a webpage which has the files uploaded to it using xls file extension, when our process tries to download them and we're using excel 2016 this prob is encountered.
 

VJR

Well-Known Member
Migrating to the latest file formats would be the best suitable option.
If that is not possible then see if you are able to spy the warning window and/or its buttons. Export the doc, click on Open and when the prompt shows up at that time open the Application Modeller and spy the warning box. Typically this may (or may not) require a separate Object outside of the existing one for the spying.
 
Top