3

I am new to writing excel add-in (in C#) and trying to figure out the right way to save some internal data structures so I can restore the state the next time file is opened. I can convert data in xml or base64 strings if it makes things easier. I don't want to maintain a separate file and would like to embed this information inside excel worksheet.

Many thanks for your help.

Kara
  • 6,115
  • 16
  • 50
  • 57
Yuri Romanenko
  • 159
  • 1
  • 9
  • "don't know know how to hide this from the user of your addin". i think this is it, I guess I can write data out into a given cell, but definitely don't want the user to see it or be able to manipulate this data. – Yuri Romanenko Nov 13 '11 at 17:58

1 Answers1

3

Use a cell in an invisible sheet (you can name it, for example, "internal data sheet") for storing the information. Excel sheets have a Visible property which can be set programmatically to `xlVeryHidden' which means it can only be made visible again by a program. Here you find some more information:

http://support.microsoft.com/kb/142530/en-us

Doc Brown
  • 19,739
  • 7
  • 52
  • 88