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. adding data to MS Excel in C#.net

adding data to MS Excel in C#.net

Scheduled Pinned Locked Moved C#
csharphelp
7 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.
  • V Offline
    V Offline
    varun_mca_ju 0
    wrote on last edited by
    #1

    i have a C# windows application form with various controls such as textbox ,combo box,date time picker etc. i want that on clicking a button PRINT the data entered by the user in the controls should be added to particular cells of an existing Excel sheet (for e.g. i have to add the data in textBox1 to a particular cell of sheet1.xls saved on desktop)and then the sheet should be printed..i don't want the data to be saved on the sheet as i want that the next time i click the PRINT button the new data should be entered to the same cell. ...plz help and thanks in advance

    P J D 3 Replies Last reply
    0
    • V varun_mca_ju 0

      i have a C# windows application form with various controls such as textbox ,combo box,date time picker etc. i want that on clicking a button PRINT the data entered by the user in the controls should be added to particular cells of an existing Excel sheet (for e.g. i have to add the data in textBox1 to a particular cell of sheet1.xls saved on desktop)and then the sheet should be printed..i don't want the data to be saved on the sheet as i want that the next time i click the PRINT button the new data should be entered to the same cell. ...plz help and thanks in advance

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      You should read up on using the Office Interop Library.

      "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

      V 1 Reply Last reply
      0
      • V varun_mca_ju 0

        i have a C# windows application form with various controls such as textbox ,combo box,date time picker etc. i want that on clicking a button PRINT the data entered by the user in the controls should be added to particular cells of an existing Excel sheet (for e.g. i have to add the data in textBox1 to a particular cell of sheet1.xls saved on desktop)and then the sheet should be printed..i don't want the data to be saved on the sheet as i want that the next time i click the PRINT button the new data should be entered to the same cell. ...plz help and thanks in advance

        J Offline
        J Offline
        John_Adams
        wrote on last edited by
        #3

        Hi, Download the VSTO(Visual Studio Tools for Office)addins, which and specifically meant for Office applications learn them, from the following location: http://www.microsoft.com/downloads/details.aspx?familyid=F5539A90-DC41-4792-8EF8-F4DE62FF1E81&displaylang=en[^] Hope this helps . Regards, John Adams ComponentOne LLC

        Regards, John Adams ComponentOne LLC

        P 1 Reply Last reply
        0
        • P Paul Conrad

          You should read up on using the Office Interop Library.

          "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

          V Offline
          V Offline
          varun_mca_ju 0
          wrote on last edited by
          #4

          thanks for the reply Paul ...it would be great if you could explain the technique to me as i am a novice in the field of C#.Net programming :sigh:

          P 1 Reply Last reply
          0
          • V varun_mca_ju 0

            thanks for the reply Paul ...it would be great if you could explain the technique to me as i am a novice in the field of C#.Net programming :sigh:

            P Offline
            P Offline
            Paul Conrad
            wrote on last edited by
            #5

            Do a basic google search for Office Interop Library, also, check out the link John just posted.

            "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

            1 Reply Last reply
            0
            • J John_Adams

              Hi, Download the VSTO(Visual Studio Tools for Office)addins, which and specifically meant for Office applications learn them, from the following location: http://www.microsoft.com/downloads/details.aspx?familyid=F5539A90-DC41-4792-8EF8-F4DE62FF1E81&displaylang=en[^] Hope this helps . Regards, John Adams ComponentOne LLC

              Regards, John Adams ComponentOne LLC

              P Offline
              P Offline
              Paul Conrad
              wrote on last edited by
              #6

              I don't know what happened, your post should have gone to the OP, and for some reason came up in my email :suss: Good link, and I directed the OP to your post.

              "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

              1 Reply Last reply
              0
              • V varun_mca_ju 0

                i have a C# windows application form with various controls such as textbox ,combo box,date time picker etc. i want that on clicking a button PRINT the data entered by the user in the controls should be added to particular cells of an existing Excel sheet (for e.g. i have to add the data in textBox1 to a particular cell of sheet1.xls saved on desktop)and then the sheet should be printed..i don't want the data to be saved on the sheet as i want that the next time i click the PRINT button the new data should be entered to the same cell. ...plz help and thanks in advance

                D Offline
                D Offline
                dan sh
                wrote on last edited by
                #7

                Another way can be using OloeDB classes. You can connect to the excel file and perform insert.

                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