none
Open file using COM Interop RRS feed

  • Question

  • Hi

    I'm attempting to automate the opening a large number of files, each file is then processed and logged. However I've run into an issue when a file links to an encrypted spreadsheet. Even though I have links set to never update on opening the spreadsheet, the application stops and opens up a visible instance of excel requesting the password for the encrypted file. Is there any way to bypass this. The processing I'm doing does not require the links to be updated.

    I've attempted placing the opening of the Excel file in a separate thread and limiting its time allowed to open, but while my code throws the expected TimeoutException, the Excel instance(with password screen) remains.

     

    Thanks

    Kevin

     

     

    Thursday, December 2, 2010 11:25 AM

Answers

  • Never mind solved it myself. The MSDN documentation indicates setting the second parameter on workbooks.Open to 2 will disable updating links, this actually has to be set to false... which makes more sense.

     

    Thanks anyway

    • Marked as answer by Cookie Luo Monday, December 6, 2010 1:43 AM
    Thursday, December 2, 2010 11:36 AM

All replies

  • Never mind solved it myself. The MSDN documentation indicates setting the second parameter on workbooks.Open to 2 will disable updating links, this actually has to be set to false... which makes more sense.

     

    Thanks anyway

    • Marked as answer by Cookie Luo Monday, December 6, 2010 1:43 AM
    Thursday, December 2, 2010 11:36 AM
  • Hi

    Thanks for sharing your answer.

    Best Regards,


    Please mark the right answers which satisfy your requirements.That will be helpfull for all community members. Thanks, Cookie
    Monday, December 6, 2010 1:42 AM