Bug: "Export to CSV file" should write BOM to work correctly with Excel
When viewing data in the grid and using the "Export to CSV file", the resulting file doesn’t have a BOM (byte order mark), and so when you double-click the CSV file, Excel opens up and (at least in Excel 2010) shows the following dialog box:
The file you are trying to open, 'MyData.csv', is in a different format than specified by the file extension. Verify that the file is not corrupt and is from a trusted source before opening the file. Do you want to open the file now?
If you click 'Yes', another dialog box is displayed:
Excel has detected that 'MyData.csv' is a SYLK file, but cannot load it. Either the file has errors or it is not an SYLK file format. Click OK to try to open the file in a different format.
When you then click OK, the file open up correctly. This can all be avoided if a BOM is written at the beginning of the file. This can be easily tested by opening the CSV file in Notepad, and then using 'Save As...' and selecting 'UTF-8' as the encoding. The resulting file opens up correctly in Excel without any dialog boxes!