none
Not able to open a downloaded untrusted excel file programmatically RRS feed

  • Question

  • Hi, my co-worker asked a question on community forums but didn't get a follow-up response:  https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_win10/not-able-to-open-a-downloaded-untrusted-excel-file/82c82d26-6180-435d-b49e-958962d0756c?tm=1492559944783&rtAction=1492640940552

    Would anyone here be able to help?

    Monday, July 17, 2017 5:03 AM

Answers

  • Hi ivdone,

    I can understand your issue.

    I find that on July 11, 2017 one security related update launched.

    Description of the security update for Excel 2016: July 11, 2017

    did you try to install new update?

    you can try to install it and make a test.

    it is possible that it can solve the issue.

    if it not solve the issue then you can try to submit your feedback to user voice.

    try to test and let me know about the result.

    if that not work I will provide you link for user voice.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Friday, July 21, 2017 7:21 AM
    Moderator

All replies

  • Hi kiratsu,

    first I am not aware with the language you are using to open Excel file.

    generally on this forum , we provide support for VBA, VB, C#.

    so if possible try to post code in this language and we will try to help you to solve the issue.

    other thing I want to suggest you that post the whole issue with the code in detail instead of posting link.

    it is possible that in future , link get broken and we don't get any information.

    in general , I suggest you to disable your anti virus for testing purpose and try to run your code and check whether it can open the file or not.

    let us know about your testing result , so that we can try to provide you further suggestions to solve the issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, July 18, 2017 2:30 AM
    Moderator
  • Hi Deepak,

    The issue also exist in c# without anti-virus. Here is the code:

                System.Diagnostics.Process fileProcess = new System.Diagnostics.Process();

    fileProcess.StartInfo.FileName = _downloadFilename; try { fileProcess.Start(); } catch (System.ComponentModel.Win32Exception err) { if (err.NativeErrorCode == 1155) { // Opening a file with an unregistered extension on XP causes a // Win32 exception to be thrown. In this case, display the // 'Open With' dialog. System.Diagnostics.Process.Start("rundll32.exe", "shell32.dll, OpenAs_RunDLL " + _downloadFilename); } else { MessageBox.Show("An error has occurred trying to open this file: " + err.Message, "FactSet RT", MessageBoxButton.OK, MessageBoxImage.Error); } }


    One odd behavior is that if I open the file by double click, then download and open another file without closing excel. The file opens correctly.

    Also I observed that this issue is only reproduced in office 2016. It is opened in 2013 correctly in 'protected mode'.

    Please let me know if there is other information needed.


    • Edited by ivdone Tuesday, July 18, 2017 5:52 PM
    Tuesday, July 18, 2017 5:47 PM
  • Hi ivdone,

    I try to make test on my side with Excel 2016.

    on my side I am able to open the file successfully.

    and it is showing me the warning to enable the editing because it is protected.

    I am using the version below.

    if you are available with this version you can make a test.

    or you can let us know which version you are using.

    if you are available with any updates that you did not installed then you can try to install them and make a test.

    for a testing purpose try to uncheck the below settings in your Excel and try to make a test again.

    if you disable it then Excel will allow to open protected file without any prompt.

    let me know about your testing result.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Wednesday, July 19, 2017 5:53 AM
    Moderator
  • Hi Deepak,

    Thanks for the quick response.

    We have tried to modify the trust center settings. Here is the behavior:

    1. after unchecking 'Enable Protected View for files originating from the Internet', the file opens correctly but not protected mode.

    2. after adding the download path to trusted location, the files opens correctly but not in protected mode.

    So it seems like it is related to using protected view. 

    Here is the version I am running on:

    Microsoft Office Professional Plus 2016

    Microsoft Excel 2016 MSO (16.0.4549.1000) 32-bit

    Thanks,

    Zhengzhou

    Wednesday, July 19, 2017 6:32 PM
  • Hi ivdone,

    if we focus on your second result then can you make a test with 'Protected View' enabled and you are having your document at trusted location.

    do you able to open the file?

    you can try to make a test. if you are able to open the file then you just need to save your document in trusted location and it can solve your issue.

    but if you are not able to open the file and you are 100% sure that your downloaded file are safe then you can take a risk to disable the 'Protected View' to open the file successfully.

    let me know about your testing result.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 20, 2017 2:40 AM
    Moderator
  • Hi Deepak,

    Thanks for the workaround. I am able to disable the protected view or save it to a trusted location to solve this issue.

    But the problem is when our clients are using our product, we don't have control over where they want the file to be saved. Also we are not able to disable 'Protected View' for all clients.

    Since the downloaded file is intact, we expect it to be opened in either 'Protected View' or normal mode depends on users settings. 

    Two odd behaviors that might help narrow down the issue.

    1. I open the file by double click in file explorer, then download and use the above code to open another file without closing excel. The file opens correctly.

    2. When we have the debugger attached to the process which is trying to open the file. The file opens correctly in 'Protected View'.

    Thursday, July 20, 2017 5:27 PM
  • Hi ivdone,

    I can understand your issue.

    I find that on July 11, 2017 one security related update launched.

    Description of the security update for Excel 2016: July 11, 2017

    did you try to install new update?

    you can try to install it and make a test.

    it is possible that it can solve the issue.

    if it not solve the issue then you can try to submit your feedback to user voice.

    try to test and let me know about the result.

    if that not work I will provide you link for user voice.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Friday, July 21, 2017 7:21 AM
    Moderator
  • Hi Deepak,

    Thanks for investigating.

    I have applied the patch you mentioned. The file is opened correctly without any issue in "protected view". 

    Since this is fixed by the Office's patch, can we confirm which versions of office were affected by this issue? So we can ask our client to update when they are facing this issue in a broken version.

    Thanks,

    Zhengzhou

    Monday, July 24, 2017 11:54 PM
  • Hi ivdone,

    most probably it is the last version you are using before updating with the latest one.

    that is Microsoft Excel 2016 MSO (16.0.4549.1000) 32-bit.

    you can inform your customer that if they met with the issue then they can install above update to solve the issue.

    I can see that your issue is solved now.

    so I suggest you to mark the answer. so that we can close this thread.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, July 25, 2017 5:10 AM
    Moderator
  • Hi Deepak,

    Thanks for your efforts on this issue.

    I have marked the previous one as answer.

    Regards,

    Zhengzhou

    Tuesday, July 25, 2017 5:58 PM
  • Hi Deepak,

    One of my co-workers @hsrikonda is able to reproduce this issue even after installing this security update.

    I tried to test it again and the issue is also reproduced. 

    Is there any recent update that might break this again? 

    Thanks

    Monday, August 14, 2017 11:03 PM
  • Hi ivdone,

    till now , I did not get any new feedback for this specific problem from other users.

    if we talk about the update , then yes there is a new update.

    are you testing with the latest updates ?

    if possible let us know about your latest version.

    if possible then we will again try to make a test and inform you about the result.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, August 15, 2017 6:12 AM
    Moderator
  • Hi Deepak,

    Here is our version for excel .

    Microsoft Excel 2016 MSO (16.0.4549.1000) 32-bit

    We are seeing the same issue again right now. All behaviors remains the same as I mentioned previously.

    Thanks

    Zhengzhou

    Tuesday, August 15, 2017 5:46 PM
  • Hi ivdone,

    I think that the new update for Excel is available and you are using old version.

    try to install the latest version and try to check the issue again.

    let me know , whether it solves your issue or not.

    otherwise we can try to submit the feedback to user voice.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, August 16, 2017 6:00 AM
    Moderator
  • Hi Deepak,

    I am the colleague of @ivdone. I installed the latest update for Excel: https://support.microsoft.com/en-us/help/3085435/august-8-2017-update-for-excel-2016-kb3085435

    But, the Excel version still says: Microsoft Excel 2016 MSO (16.0.4549.1000) 32-bit.
    And I still see the same error.

    Also, I get the same error with Powerpoint 2016

    Thanks,
    Hari Kishan.

    • Edited by hsrikonda Thursday, August 17, 2017 10:32 PM
    Thursday, August 17, 2017 12:34 AM
  • Hi hsrikonda,

    try to provide your feedback to Excel user voice regarding this issue.

    Welcome to Excel’s Suggestion Box!

    try to use the work around that I suggested in my earlier replies.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, August 18, 2017 5:23 AM
    Moderator
  • Hi Deepak,

    As suggested, I posted the issue on User Voice here: https://excel.uservoice.com/forums/304921-excel-for-windows-desktop-application/suggestions/30934651-not-able-to-open-a-downloaded-untrusted-excel-file.

    Let me know if I need to add anything more so that it is more visible

    Thanks,

    Hari Kishan.

    • Edited by hsrikonda Tuesday, August 22, 2017 6:17 PM
    Tuesday, August 22, 2017 6:16 PM
  • Hi Deepak,

    I found that Office 2010 doesn't have any issue opening these files. Let me know if that helps in narrowing down the cause.

    Also, it's been more than two weeks since I posted on the User Voice, but I didn't get any response. Can you please help me out there?

    Thanks,
    Hari Kishan.

     

    Thursday, September 7, 2017 5:14 PM
  • Hi hsrikonda,

    As I informed you before the issue is related with update and specific version.

    so you will not able to reproduce with older versions.

    other thing you had mentioned that you did not get any response from user voice.

    I want to inform you that we are not handling user voice forum and we are not directly connected with that forum.

    so you can again raise one post try to ask them about the status.

    Besides, If the issue is urgent for you, I suggest you contact the Microsoft professional support.

    If the support engineer determines that the issue is the result of a bug, the service request will be a no-charge case and you won't be charged.

    Please visit the below link to see the various paid support options that are available to better meet your needs.

    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone

    Sorry for any inconvenience and have a nice day! 

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, September 8, 2017 12:57 AM
    Moderator