VSTO - Best place to store Excel workbook settings

Go To StackoverFlow.com

2

I have a legacy Excel AddIn implemented in VBA which I am slowly porting to .net using VSTO. Using this AddIn I am storing settings per workbook within a hidden sheet. I was wondering if there is a better approach to do this using VSTO.

2012-04-03 20:41
by Dimitris
Do you have access to a database that you can store the settings to - Peter Majeed 2012-04-06 18:16
no unfortunately not, it all has to be standalone - Dimitris 2012-04-11 12:18


2

You can use Custom Document Properties to store the settings.

2012-04-03 21:16
by Kiru
Looks good, I will have to give it a go and see if I can store everything I need in there - Dimitris 2012-04-03 21:22
Unfortunately I will stick to the hidden sheet approach for my metadata purely because custom document properties are quite limited - Dimitris 2012-04-04 11:16
Out of curiosity, Can I ask what stops you in using CDP's? We had settings shared by different application so the settings are stored in ini file. The path for the ini file and the value to lookup in ini files are stored in CDP's - Kiru 2012-04-04 11:57
I almost need to serialise a number of objects in there with ArrayLists which I don't think you can do with CDPs. At least I don't have the time or the luxury to experiment with this - Dimitris 2012-04-04 12:20
Seems to be complex, Good luck - Kiru 2012-04-04 22:30
Ads