I'm trying to find a way to change the locale settings when opening Excel, or changing the entire system locale settings. I know it's bad practice to do this, so I'll just note that this is purely for automated testing reasons. We want to run our Excel add-in simulating multiple different locale settings to make sure it's handling all the functions properly (if there's a better way of doing this than changing settings please let me know!)
I know how to change the CurrentCulture of the thread, but that only seems to apply to our add-in, so functions of Excel called by our add-in run with the system locale settings.
There are 3 ways I've found that I thought might get this working, but one of them seems like an insanely bad idea, and the other two I can't manage to get working:
If anyone can provide any help it would be greatly appreciated, otherwise I guess these are just being left as manual tests!
Here you have a full example of how to call SetLocaleInfo from .Net. I won't copy here for brevity, it's a
http://took1.googlecode.com/svn-history/r87/trunk/Code/App.Dev/SetLocale.cs