+ Reply to Thread
Results 1 to 7 of 7

How to perisist object in Excel

  1. #1
    Dev
    Guest

    How to perisist object in Excel

    How to persist the object between different sessions within Excel.

    I am creating an application which is addin to Excel. When ever I close
    Excel application, I want to store the object that I created so far - so
    that, I can read it back when I reopen the same Excel file that I closed
    earlier. Is it doable using Excel OM?

    Thanks!!

  2. #2
    Tom Ogilvy
    Guest

    RE: How to perisist object in Excel

    I think you would have to write it out where it would be stored as data, then
    read in the data and reconstruct the "object".

    In any event, I doubt there is any built in support for it - you would have
    to do all the work.

    --
    Regards,
    Tom Ogilvy



    "Dev" wrote:

    > How to persist the object between different sessions within Excel.
    >
    > I am creating an application which is addin to Excel. When ever I close
    > Excel application, I want to store the object that I created so far - so
    > that, I can read it back when I reopen the same Excel file that I closed
    > earlier. Is it doable using Excel OM?
    >
    > Thanks!!


  3. #3
    John.Greenan
    Guest

    RE: How to perisist object in Excel

    Dev,

    What objects are you creating? Can you supply a bit more information? Tom
    is probably right, but some objects can be persisted easily - such as
    commandbars.

    Post back with an answer and we can go from there.


    --
    www.alignment-systems.com


    "Dev" wrote:

    > How to persist the object between different sessions within Excel.
    >
    > I am creating an application which is addin to Excel. When ever I close
    > Excel application, I want to store the object that I created so far - so
    > that, I can read it back when I reopen the same Excel file that I closed
    > earlier. Is it doable using Excel OM?
    >
    > Thanks!!


  4. #4
    Dev
    Guest

    RE: How to perisist object in Excel

    No it's not commandbars.....

    Thanks!!

    "John.Greenan" wrote:

    > Dev,
    >
    > What objects are you creating? Can you supply a bit more information? Tom
    > is probably right, but some objects can be persisted easily - such as
    > commandbars.
    >
    > Post back with an answer and we can go from there.
    >
    >
    > --
    > www.alignment-systems.com
    >
    >
    > "Dev" wrote:
    >
    > > How to persist the object between different sessions within Excel.
    > >
    > > I am creating an application which is addin to Excel. When ever I close
    > > Excel application, I want to store the object that I created so far - so
    > > that, I can read it back when I reopen the same Excel file that I closed
    > > earlier. Is it doable using Excel OM?
    > >
    > > Thanks!!


  5. #5
    Chip Pearson
    Guest

    Re: How to perisist object in Excel

    There several way you can store the properties of your object.
    One would be to write the property values to worksheet cells,
    perhaps on a hidden sheet. Another would be to store the
    properties in defined names. Finally, you could store the
    properties in custom document properties.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com

    "Dev" <[email protected]> wrote in message
    news:[email protected]...
    > How to persist the object between different sessions within
    > Excel.
    >
    > I am creating an application which is addin to Excel. When ever
    > I close
    > Excel application, I want to store the object that I created so
    > far - so
    > that, I can read it back when I reopen the same Excel file that
    > I closed
    > earlier. Is it doable using Excel OM?
    >
    > Thanks!!




  6. #6
    Dev
    Guest

    Re: How to perisist object in Excel

    Yes, I am storing some of my hidden data in custom doc properties (each field
    in custom doc properties can be of length 255 chars...) but I also want to
    store an object....

    "Chip Pearson" wrote:

    > There several way you can store the properties of your object.
    > One would be to write the property values to worksheet cells,
    > perhaps on a hidden sheet. Another would be to store the
    > properties in defined names. Finally, you could store the
    > properties in custom document properties.
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    > "Dev" <[email protected]> wrote in message
    > news:[email protected]...
    > > How to persist the object between different sessions within
    > > Excel.
    > >
    > > I am creating an application which is addin to Excel. When ever
    > > I close
    > > Excel application, I want to store the object that I created so
    > > far - so
    > > that, I can read it back when I reopen the same Excel file that
    > > I closed
    > > earlier. Is it doable using Excel OM?
    > >
    > > Thanks!!

    >
    >
    >


  7. #7
    Tim Williams
    Guest

    Re: How to perisist object in Excel

    What is it about the object you wish to store that can't be handled by storing its properties?
    When you create the object and modifiy it you're modifying its properties: as long as you can capture those somehow then you can
    re-create the object...

    Maybe consider adding serialize/deserialize methods to your object if you need this.

    --
    Tim Williams
    Palo Alto, CA


    "Dev" <[email protected]> wrote in message news:[email protected]...
    > Yes, I am storing some of my hidden data in custom doc properties (each field
    > in custom doc properties can be of length 255 chars...) but I also want to
    > store an object....
    >
    > "Chip Pearson" wrote:
    >
    > > There several way you can store the properties of your object.
    > > One would be to write the property values to worksheet cells,
    > > perhaps on a hidden sheet. Another would be to store the
    > > properties in defined names. Finally, you could store the
    > > properties in custom document properties.
    > >
    > >
    > > --
    > > Cordially,
    > > Chip Pearson
    > > Microsoft MVP - Excel
    > > Pearson Software Consulting, LLC
    > > www.cpearson.com
    > >
    > > "Dev" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > How to persist the object between different sessions within
    > > > Excel.
    > > >
    > > > I am creating an application which is addin to Excel. When ever
    > > > I close
    > > > Excel application, I want to store the object that I created so
    > > > far - so
    > > > that, I can read it back when I reopen the same Excel file that
    > > > I closed
    > > > earlier. Is it doable using Excel OM?
    > > >
    > > > Thanks!!

    > >
    > >
    > >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1