ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to perisist object in Excel (https://www.excelbanter.com/excel-programming/364184-how-perisist-object-excel.html)

dev

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!!

Tom Ogilvy

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!!


John.Greenan

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!!


dev

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!!


Chip Pearson

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" wrote in message
...
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!!




dev

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" wrote in message
...
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!!





Tim Williams

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" wrote in message ...
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" wrote in message
...
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!!








All times are GMT +1. The time now is 11:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com