I have a data grid from which I am exporting data to excel. Note that the regional settigns I am using is of Denmark(danish) and when I try to export data the value2 property always removes the decimal point(.) and makes it as continous string. That is, if I have value 220.127.116.11 it will convert to 123010 which is not expected. One more issue is, when I have some date string ex "01-01-2000" and I export the value2 shows it as some junk value and same appears in excel. This is really eating my time to fix the issue.
Is this some thing related to regional setting, if yes then need a solution to which makes it to work irrespective of cultural settings.
Pasted piece of code which I am looking into,
Note: Here valueObj is object
if (dataType != null && dataType.ToString().Contains("System.DateTime"))