We extract data from Excel files using the ExportDataTableAsString method.
In a general way, it seems that values are correctly extracted from file. But, sometimes, dot decimal marks are transformed in comma separator by the function. It’s critical for our application.
Could you have a check on it and explain me if the problem comes from the function or the input file?
Well, it might be due to your regional settings/locale of your system where you are performing this operation/code. What is your locale or regional settings of the OS where you are running the application? Also, could you open the template file into MS Excel on the system to check if you see decimal dots are replaced with commas for the values. Please provide us a simple console application (you may zip it prior attaching here) to show the issue. Also give us some screenshots (e.g taken when viewing the template Excel file into MS Excel on the machine where you are executing the code segment) to trace the issue. This will help us really to evaluate your issue precisely to consequently figure it out soon.
Thanks for your help.
We work for an international company, so all the platforms (client/server) are in English.
However, after several tests with a console tool, we conclude that original XLS file has been produced by a user in a french environment, that’s why the function returns comma instead of dot digital mark.
If we apply the following code line, It seems that the returned values will be correctly transformed :
wkBook.Settings.Region = CountryCode.UnitedKingdom
Do you think it’s a good fix? Do you think that this implementation is only required for XLS files treatment? Not XLSX? I have read that ASPOSE retrieve locale from OS for XLSX files treatment? Is it right?