Distributing Office Applications built in Excel - Multiple Versions, Copying data in from old version
I'm working on a project where we'd like to be able to deploy an Excel spreadsheet to multiple users, and then be able to update that spreadsheet to different versions as the project progresses. Basically Excel is the user interface, and we are calling several .NET 4.0 .dll's that do the heavy lifting using VBA code.
I found information on Microsoft's ClickOnce technology and it looks very promising.
http://msdn.microsoft.com/en-us/library/ff961899.aspxThe problem that I'm envisioning involves the update of the actual spreadsheet. Users will be populating many worksheets of data, and every time we release a new version, they'll have to copy paste all the data into the new program.
Does anyone know of a way that we could use something like a macro enabled template that we'd deploy in the ClickOnce solution, that we could then link to from the users latest Workbook? The thought be开发者_C百科ing that as long as we only added features and didn't move things around, we could move forward without huge inconveniences to the user?
Any ideas would be much appreciated.
In addition to using an addin you should
- ensure your code uses defined names for all references to cells so that your code is protected from the user inserting/deleteing rows
- store a version number in a defined name in every workbook(via code) so that your code can take appropriate action if there are breaking changes
It sounds like you need to put your code into an addin and distribute that. That would solve the problem of separating your code from the data.
精彩评论