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. C#
  4. Problem with excel 97

Problem with excel 97

Scheduled Pinned Locked Moved C#
csharphelpquestionannouncementlearning
8 Posts 2 Posters 0 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.
  • A Offline
    A Offline
    AnnnS
    wrote on last edited by
    #1

    Hi all i am trying to automate MSEXcel.. i hav win2K as OS and Excel version is 97 i hav added the reference as Excel 8.0 ... Now when i try to open the Excel Work book, it gives out an exception (COMException).... but when i try the same caode in excel 2000 with Excel 9.0 as reference i am able to do ... i am using .netframework 2.0 ... is it not compatible with excel 97??? is there any way to solve this problem??? Thanks Akhil

    E 1 Reply Last reply
    0
    • A AnnnS

      Hi all i am trying to automate MSEXcel.. i hav win2K as OS and Excel version is 97 i hav added the reference as Excel 8.0 ... Now when i try to open the Excel Work book, it gives out an exception (COMException).... but when i try the same caode in excel 2000 with Excel 9.0 as reference i am able to do ... i am using .netframework 2.0 ... is it not compatible with excel 97??? is there any way to solve this problem??? Thanks Akhil

      E Offline
      E Offline
      Ed Poore
      wrote on last edited by
      #2

      AnnnS wrote:

      is there any way to solve this problem???

      By providing more details.


      Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9 Ed

      A 1 Reply Last reply
      0
      • E Ed Poore

        AnnnS wrote:

        is there any way to solve this problem???

        By providing more details.


        Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9 Ed

        A Offline
        A Offline
        AnnnS
        wrote on last edited by
        #3

        When i try to open the Workbook... ie Excel.Workbook wb= wbs.open("abc.xls",Type.missing .........) At this line error Occurs ... System.Runtime.InteropServices.COMException (0x8007F808): Exception from HRESULT: 0x8007F808 at Excel.Workbooks.Open(String Filename, Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru) this is the Error Message....

        E 1 Reply Last reply
        0
        • A AnnnS

          When i try to open the Workbook... ie Excel.Workbook wb= wbs.open("abc.xls",Type.missing .........) At this line error Occurs ... System.Runtime.InteropServices.COMException (0x8007F808): Exception from HRESULT: 0x8007F808 at Excel.Workbooks.Open(String Filename, Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru) this is the Error Message....

          E Offline
          E Offline
          Ed Poore
          wrote on last edited by
          #4

          Two things I can think of at the moment 1) Make sure all the parameters are correct and that the file exists. 2) Make sure your Main function is marked with the STAThread attribute.


          Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9 Ed

          A 1 Reply Last reply
          0
          • E Ed Poore

            Two things I can think of at the moment 1) Make sure all the parameters are correct and that the file exists. 2) Make sure your Main function is marked with the STAThread attribute.


            Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9 Ed

            A Offline
            A Offline
            AnnnS
            wrote on last edited by
            #5

            hi... thanx for the response ... As u told i hav checked everything ... everything seem to be correct ... i hav added STAThread Attribute also ... My Concern is when i do the same operation in one pc with excel 2000 installed with Microsoft Excel 9.0 Object Library , it works fine ... but when i try it in another pc with Excel 97 installed with Microsoft Excel 8.0 Object Library reference , it gives the Above given exception ... for last one week i hav been struggling with this problem ... plz help .. Thanks Akhil

            E 1 Reply Last reply
            0
            • A AnnnS

              hi... thanx for the response ... As u told i hav checked everything ... everything seem to be correct ... i hav added STAThread Attribute also ... My Concern is when i do the same operation in one pc with excel 2000 installed with Microsoft Excel 9.0 Object Library , it works fine ... but when i try it in another pc with Excel 97 installed with Microsoft Excel 8.0 Object Library reference , it gives the Above given exception ... for last one week i hav been struggling with this problem ... plz help .. Thanks Akhil

              E Offline
              E Offline
              Ed Poore
              wrote on last edited by
              #6

              Are you sure that the spreadsheet is a compatible version, i.e. it can be opened normally in Excel 97?


              Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9 Ed

              A 1 Reply Last reply
              0
              • E Ed Poore

                Are you sure that the spreadsheet is a compatible version, i.e. it can be opened normally in Excel 97?


                Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9 Ed

                A Offline
                A Offline
                AnnnS
                wrote on last edited by
                #7

                Thats what i too want to know .. :D

                E 1 Reply Last reply
                0
                • A AnnnS

                  Thats what i too want to know .. :D

                  E Offline
                  E Offline
                  Ed Poore
                  wrote on last edited by
                  #8

                  Open in Excel 97 manually and see :doh:


                  Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9 Ed

                  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