I have a VSTO add-in for Excel. In this VSTO I have a taskPane with a textbox and a label. The user writes in the textbox a numberformat and in the label an example is presented with the applied numberformat.
In order to update the label I use Application.WorksheetFunctions.Text. However this method returns the number format in English format and not in my system language as Excel does. I would not like to change the hole language of VSTO.
So is there a way to change the language only while I call the Text method?
Ex: Application.WorksheetFunctions.Text(DateTime.ToOADate(),"dddd, MMMM dd, yyyy hh:mm:ss") =>Wednesday, March 14, 2001 13:30:55
while excel gives me => miercuri, martie 14, 2001 13:30:55