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. C# to excel

C# to excel

Scheduled Pinned Locked Moved C#
comcsharphelpquestionannouncement
6 Posts 3 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.
  • P Offline
    P Offline
    prithaa
    wrote on last edited by
    #1

    Hello, I can write code to read and write to excel and word.But I face problems with versions.A certain version works at my end and doesnt work at the client end. I have included Microsoft Excel 12.0 Object Library at my end and found that the client didnt have this library .He had Microsoft Excel 5.0 Object Library .So I coded According to version 5.0 but still at the client end I am getting the error saying the Interop file doesnt exist.It works fine with me. Can you tell me how do I nail down version problems and Is the COM coding for Microsoft Excel Word different for different versions. Thanks Pritha

    A J 2 Replies Last reply
    0
    • P prithaa

      Hello, I can write code to read and write to excel and word.But I face problems with versions.A certain version works at my end and doesnt work at the client end. I have included Microsoft Excel 12.0 Object Library at my end and found that the client didnt have this library .He had Microsoft Excel 5.0 Object Library .So I coded According to version 5.0 but still at the client end I am getting the error saying the Interop file doesnt exist.It works fine with me. Can you tell me how do I nail down version problems and Is the COM coding for Microsoft Excel Word different for different versions. Thanks Pritha

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      prithaa wrote:

      saying the Interop file doesnt exist.I

      If your code creates an interop file, that file needs to be available on your client's system.

      My signature "sucks" today

      P 1 Reply Last reply
      0
      • A Abhinav S

        prithaa wrote:

        saying the Interop file doesnt exist.I

        If your code creates an interop file, that file needs to be available on your client's system.

        My signature "sucks" today

        P Offline
        P Offline
        prithaa
        wrote on last edited by
        #3

        Thanks for your reply Which files do I need check ? I am sending the exe file of my working project. Pritha

        A 1 Reply Last reply
        0
        • P prithaa

          Hello, I can write code to read and write to excel and word.But I face problems with versions.A certain version works at my end and doesnt work at the client end. I have included Microsoft Excel 12.0 Object Library at my end and found that the client didnt have this library .He had Microsoft Excel 5.0 Object Library .So I coded According to version 5.0 but still at the client end I am getting the error saying the Interop file doesnt exist.It works fine with me. Can you tell me how do I nail down version problems and Is the COM coding for Microsoft Excel Word different for different versions. Thanks Pritha

          J Offline
          J Offline
          J Dunlap
          wrote on last edited by
          #4

          Excel 5.0 came out 'way back in 1993 IIRC... I wouldn't be surprised if you had some trouble getting it to work - there aren't any Primary Interop Assemblies for it and working with it directly through COM can be iffy. If your Word and Excel files are not too complex, I would advise you to use NPOI[^] to read from and generate the files. NPOI does not depend on Word or Excel in order to work - so there are no version problems, and you don't even have to worry if the machine your code is running on even has Office at all. It supports formatting like fonts, font styles, colors, tables, formulas, col and row sizing and autosizing, document properties, etc.

          P 1 Reply Last reply
          0
          • P prithaa

            Thanks for your reply Which files do I need check ? I am sending the exe file of my working project. Pritha

            A Offline
            A Offline
            Abhinav S
            wrote on last edited by
            #5

            Have a look in the bin folder. Do you see any interop files? If yes, then you would need to include them along with your exe.

            My signature "sucks" today

            1 Reply Last reply
            0
            • J J Dunlap

              Excel 5.0 came out 'way back in 1993 IIRC... I wouldn't be surprised if you had some trouble getting it to work - there aren't any Primary Interop Assemblies for it and working with it directly through COM can be iffy. If your Word and Excel files are not too complex, I would advise you to use NPOI[^] to read from and generate the files. NPOI does not depend on Word or Excel in order to work - so there are no version problems, and you don't even have to worry if the machine your code is running on even has Office at all. It supports formatting like fonts, font styles, colors, tables, formulas, col and row sizing and autosizing, document properties, etc.

              P Offline
              P Offline
              prithaa
              wrote on last edited by
              #6

              Hello, Yes I have Interop files Interop.Excel.dll Interop.Microsoft.Office.Core.dll Interop.Microsoft.Office.Interop.Excel.dll Interop.VBIDE.dll I should send all these files alongwith exe thanks

              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