11-06-24 04:48 AM
I am a new learner of Blue Prism. I try to work in excel vbo. I create a process to read an excel workbook. While running the PROCESS an error message is shown in the ACTION to open the workbook. The error message is shown below:
Internal : Could not execute code stage because exception thrown by code stage: Culture is not supported.
Parameter name: culture
0 (0x0000) is an invalid culture identifier.
Please, help me to rectify the above error.
Thank you very much.
11-06-24 03:58 PM
hello @krlalliram - can you try below steps.
Change the "xx" to the correct culture setting for your region - this should match the language settings on the machine you are running the runtime resource.
A list of Culture Codes can be found from Microsoft here:
11-06-24 05:08 PM
Hi @krlalliram,
Agreed with @Neel1 suggestion that the issue is definitely due to incompatible language settings of the runtime machine. Just to add another enhancement to this code stage what he mentioned, we can use the below code to automatically identify the language setting as well instead of checking it manually as shown below:
try
{
// Get the current system culture
string currentCultureName = System.Globalization.CultureInfo.CurrentCulture.Name;
// Set the current thread's culture to the detected system culture
Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(currentCultureName, true);
}
catch (Exception ex)
{
throw new Exception("Error setting thread culture: " + ex.Message);
}
If this does not work for you then, you will need to search for the language settings on your machine from Search menu -> Language Settings
From here, once you know the language settings for your machine, then you can go through the suggested method that @Neel1 has mentioned.
15-06-24 05:00 AM
Thank you for your guidance. Any how the following error message is given even after executing your suggestions.
Internal : Could not execute code stage because exception thrown by code stage: Culture is not supported.
Parameter name: culture
0 (0x0000) is an invalid culture identifier.
15-06-24 11:49 AM
Hi @krlalliram,
Have you tried reinstalling Office Suite at your end as well. This then seems to be an internal problem with the DLL’s which has been configured during the installation itself or an Office update could have impacted the same. My suggestion would be to reinstall and try once and let us know on the same.