Speed issues when using GoExcel functions in large assembly - updating properties
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Boffins
I have cobbled up some code to bulk update document properties (standard and custom) from an external spreadsheet using the GoExcel commands. I have this working at the moment but the code takes a heck of a long time for large assemblies. I am certain it is because of the calls to Excel to read in all the properties I am wanting to update (for each reference in the assembly). I have been looking into reading in the excel data (property names in row A and property values in row B) in one hit and storing this in an array or something similar and then updating all referenced doc properties to suit, without having to parse the spreadsheet with each document and each property. My thinking is that this will speed things up.
Firstly, am I on the right track here and secondly how do I get my values into an array or list for processing?
Further information: the way i have set this up is that the current doc properties (assembly) are processed first (this is fast ) and then the user chooses whether to update all referenced docs. My spreadsheet is set up so that blank cells are ignored (document property will retain current value), cells with a space clear the document property and cells with text overwrite the property. I also check if the custom property exists in the document and add if missing.
I know for sure this is doable as i can find lots of mention along these lines but unfortunately have not tracked down any examples.
Any ideas, thoughts or such are most welcome.
Thanks in advance.