OperationExcel.
This problem is usually caused by the installation of the English version.OfficeBut the operating system is set to a non-English region.
In specific cases, it is found that the globalization settings in Web. config are incorrect.
Therefore, you canCodeUse the following sectionCode
Using (New changelocalehelper ("En-us "))
{
// Do something
}
Class changelocalehelper: idisposable
{
Private string _ localename;
Private string _ originallocale;
Public changelocalehelper (string localename)
{
This. _ localename = localename;
_ Originallocale = system. Threading. thread. currentthread. currentculture. Name;
System. Threading. thread. currentthread. currentculture = new system. Globalization. cultureinfo (this. _ localename );
}
# Region idisposable members
Public void dispose ()
{
System. Threading. thread. currentthread. currentculture = new system. Globalization. cultureinfo (this. _ originallocale );
}
# Endregion
}