Can you please help me with this if anybody have come across such issue?
I have to export the data (that I have managed in StringBuffer) in a csv. The code worked on my machine and I can see the exported file correctly on my machine. But there are some people who has some different 'Regional and Language Options' setting in Control panel of the OS on their machine, sees some unwanted character (? mark in small rectangle) in the spread sheet. I changed the 'Regional and Language Options' setting on my machine as to the people who has this issue and I could see the same issue on my machine as well. And also the look of exported spreadsheet is changing machine to machine as per the 'Regional and Language Options' settings they have. CAN WE FIX THIS ISSUE IN THE CODE? I have also tried to set the Locale in code to en_US so that it will render similar manner for all, but it didn't help. Below is the code snippete. I have attached the screen shot of the spreadsheet.
I am not able to attached the spreadsheet or the scrennshot for you.
I really appreciate any help with this.
I am using Windows XP.
Please go to 'Control Panel' -->'Regional and Language Options'
Here it gives us the options to set our own formats. I had selected English (Israel) and the location is 'Israel'. In 'Advanced' tab, I selected English (Israel). In 'Advanced' tab I selected English (Israel) which changes the selected checkboxes under 'Code page conversion tables in 'Advance tab.
I made the above changes on my machine to reproduce the issue on my machine, now on restoring the changes to my own setting (i.e. English (United US)), I still see the unwanted character in each cell of each row at the end of cell text. Probably the settings are not reverted corrected as few dll files were deleted/move while changing the setting.
So if this is a problem that occurs only when you change the regional settings, that is not your fault. MS Excel probably interprets the setting and overrides the encoding to reflect a given locale.
If you open the CSV with other CSV editors, do you still see the problem. If you dont you can isolate the problem to excel. There is nothing you can do about it if excel overrides the locale / encoding
That is fine if I could not revert the settings since this setting might be used by any of the user.
I have restarted the machine and tried to export the report for different contents, so it should be cached.
I just downloaded DMcsvEditor and I see a small circle in the each cell in this editor which is now different than that I see in MS execl now . It will be very difficult for the people in different countries to see the report clean. Isn't there any way we can control it in our application? .