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. Programmatic saving of an existing excel file

Programmatic saving of an existing excel file

Scheduled Pinned Locked Moved C#
csharpcomhelpquestion
3 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.
  • N Offline
    N Offline
    Nikhil Wason
    wrote on last edited by
    #1

    I want to use C# to save the changes made to an existing excel file. The path of the excel file is fixed and it can be assumed that the file is opened in an excel window from before. All I want to do is write a program that periodically saves whatever changes were made to the file (in the excel window) since it was last saved. I have tried sending the Ctrl-S windows message to excel and also tried playing around the Microsoft.Office.Interop.Excel namespace, but to no avail. Is there a way to do this that anyone is aware of? I am using Office 2007 but a solution for Office 2003 or 2002 will also be of help to me. -- Nikhil

    M 1 Reply Last reply
    0
    • N Nikhil Wason

      I want to use C# to save the changes made to an existing excel file. The path of the excel file is fixed and it can be assumed that the file is opened in an excel window from before. All I want to do is write a program that periodically saves whatever changes were made to the file (in the excel window) since it was last saved. I have tried sending the Ctrl-S windows message to excel and also tried playing around the Microsoft.Office.Interop.Excel namespace, but to no avail. Is there a way to do this that anyone is aware of? I am using Office 2007 but a solution for Office 2003 or 2002 will also be of help to me. -- Nikhil

      M Offline
      M Offline
      MadArtSoft
      wrote on last edited by
      #2

      When the Excel is opened then you have to attach your application to existing Excel process. The Save method works for me.

      C# controls, .Net components. Help Desk Software

      N 1 Reply Last reply
      0
      • M MadArtSoft

        When the Excel is opened then you have to attach your application to existing Excel process. The Save method works for me.

        C# controls, .Net components. Help Desk Software

        N Offline
        N Offline
        Nikhil Wason
        wrote on last edited by
        #3

        Can you write some sample code to attach an object of Microsoft.Office.Interop.Excel.Application to an already existing excel.exe application?

        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