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. Writing to Excel without installation of MS Excel

Writing to Excel without installation of MS Excel

Scheduled Pinned Locked Moved C#
csharpquestion
6 Posts 4 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
    Priya Prk
    wrote on last edited by
    #1

    Dear all, Is there a way to create excel files and write data into excel files using C#, without the installation of MS Excel on the computer? Thanks in advance.

    OriginalGriffO D D 3 Replies Last reply
    0
    • P Priya Prk

      Dear all, Is there a way to create excel files and write data into excel files using C#, without the installation of MS Excel on the computer? Thanks in advance.

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      There are some components out there (for example XLSReadWriteII.NET) but which versions of excel file format they support (and they are all different) is another matter. If you are talking about creating the file and writing into it, why not use a CSV file, which is simple to create, simple to amend, and any flavour of excel can read them.

      All those who believe in psycho kinesis, raise my hand.

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      P 1 Reply Last reply
      0
      • OriginalGriffO OriginalGriff

        There are some components out there (for example XLSReadWriteII.NET) but which versions of excel file format they support (and they are all different) is another matter. If you are talking about creating the file and writing into it, why not use a CSV file, which is simple to create, simple to amend, and any flavour of excel can read them.

        All those who believe in psycho kinesis, raise my hand.

        P Offline
        P Offline
        Priya Prk
        wrote on last edited by
        #3

        I can't use csv, it most be xls. What about using the oledb? with oledb u can also easly read and write excel, bud do you need then MS Excel for this?

        OriginalGriffO 1 Reply Last reply
        0
        • P Priya Prk

          I can't use csv, it most be xls. What about using the oledb? with oledb u can also easly read and write excel, bud do you need then MS Excel for this?

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #4

          Haven't tried it myself, but this says YES YOU DO[^] which makes sense to me. Have you considered farming the excel stuff to a server which does have excel loaded (I assume it is the cost that stops you installing on all machines)?

          All those who believe in psycho kinesis, raise my hand.

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          1 Reply Last reply
          0
          • P Priya Prk

            Dear all, Is there a way to create excel files and write data into excel files using C#, without the installation of MS Excel on the computer? Thanks in advance.

            D Offline
            D Offline
            Dan Mos
            wrote on last edited by
            #5

            Use OleDb. it does not require excel to bee installed on the client computer. However the file must be created first. Then fill it with data. Also note that there is no UPDATE in using OLEDB/Jet with Excel files. A way around is: delete and add.

            1 Reply Last reply
            0
            • P Priya Prk

              Dear all, Is there a way to create excel files and write data into excel files using C#, without the installation of MS Excel on the computer? Thanks in advance.

              D Offline
              D Offline
              DaveyM69
              wrote on last edited by
              #6

              NPOI[^] will do this, open source too :-D

              Dave
              BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
              Why are you using VB6? Do you hate yourself? (Christian Graus)

              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