Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Visual Basic "originated from an internet" EXCEL

Visual Basic "originated from an internet" EXCEL

Scheduled Pinned Locked Moved Visual Basic
wpfwcfcomhelp
7 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    raeyoung
    wrote on last edited by
    #1

    I have a visual basic application developed to read an EXCEL file. It is written with late binding because my development machine has Microsoft.Office.Interop.EXCEL 14 and the production machines uses Microsoft.Office.Interop.EXCEL 12. We get an error opening the workbook on the production machine but not on the development machine. It only happens for files that have the "originated from an internet" ADS. Is there an EXCEL or FILE setting I have missed?

                Dim oXL As Object = CreateObject("Excel.Application")
                Dim oWBK As Object = oXL.workbooks
                Dim oWS As Object = CreateObject("Excel.Sheet")
    
                oXL.AutomationSecurity = 3
                oXL.DisplayAlerts = False
                oXL.Visible = False
                oXL.AskToUpdateLinks = False
    
                oWBK = oXL.Workbooks.Open(Path.Combine(l\_s\_SourcePath, l\_s\_SourceFileName), UpdateLinks:=False, ReadOnly:=True, CorruptLoad:=1)
    
    L M 2 Replies Last reply
    0
    • R raeyoung

      I have a visual basic application developed to read an EXCEL file. It is written with late binding because my development machine has Microsoft.Office.Interop.EXCEL 14 and the production machines uses Microsoft.Office.Interop.EXCEL 12. We get an error opening the workbook on the production machine but not on the development machine. It only happens for files that have the "originated from an internet" ADS. Is there an EXCEL or FILE setting I have missed?

                  Dim oXL As Object = CreateObject("Excel.Application")
                  Dim oWBK As Object = oXL.workbooks
                  Dim oWS As Object = CreateObject("Excel.Sheet")
      
                  oXL.AutomationSecurity = 3
                  oXL.DisplayAlerts = False
                  oXL.Visible = False
                  oXL.AskToUpdateLinks = False
      
                  oWBK = oXL.Workbooks.Open(Path.Combine(l\_s\_SourcePath, l\_s\_SourceFileName), UpdateLinks:=False, ReadOnly:=True, CorruptLoad:=1)
      
      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Which version Excel file is causing the problem?

      R 1 Reply Last reply
      0
      • L Lost User

        Which version Excel file is causing the problem?

        R Offline
        R Offline
        raeyoung
        wrote on last edited by
        #3

        Production - interop 12

        L 1 Reply Last reply
        0
        • R raeyoung

          Production - interop 12

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          No, I asked which version Excel files, .xls or .xlsx

          R 1 Reply Last reply
          0
          • L Lost User

            No, I asked which version Excel files, .xls or .xlsx

            R Offline
            R Offline
            raeyoung
            wrote on last edited by
            #5

            doesn't matter. They both fail in production, both open no problem in dev.

            L 1 Reply Last reply
            0
            • R raeyoung

              doesn't matter. They both fail in production, both open no problem in dev.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Sorry, without more information it is impossible to guess. I would recommend either downgrading the dev machine to interop 12, or upgrading production to 14. As long as they remain out of sync then there is a potential for problems.

              1 Reply Last reply
              0
              • R raeyoung

                I have a visual basic application developed to read an EXCEL file. It is written with late binding because my development machine has Microsoft.Office.Interop.EXCEL 14 and the production machines uses Microsoft.Office.Interop.EXCEL 12. We get an error opening the workbook on the production machine but not on the development machine. It only happens for files that have the "originated from an internet" ADS. Is there an EXCEL or FILE setting I have missed?

                            Dim oXL As Object = CreateObject("Excel.Application")
                            Dim oWBK As Object = oXL.workbooks
                            Dim oWS As Object = CreateObject("Excel.Sheet")
                
                            oXL.AutomationSecurity = 3
                            oXL.DisplayAlerts = False
                            oXL.Visible = False
                            oXL.AskToUpdateLinks = False
                
                            oWBK = oXL.Workbooks.Open(Path.Combine(l\_s\_SourcePath, l\_s\_SourceFileName), UpdateLinks:=False, ReadOnly:=True, CorruptLoad:=1)
                
                M Offline
                M Offline
                Mycroft Holmes
                wrote on last edited by
                #7

                And here is why you NEVER USE EXCEL (or any office product) in a production environment. You are going to have to sort out your versioning of the office product (rinse and repeat every time the is a new office version) so all systems are using the same version. OR use a more robust transport method/tool.

                Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups