Creating a simple CSV file
-
I have spent almost 2 days trying to create a simple csv file that I can import into Excel. But I am having trouble with UNICODE. This is very simple to do in regular VC++ for desktop PC's, but how do you generate a CSV file using eMbedded VC++? Excel, on my desktop, does not like the CSV file generated from my Window CE computer.:confused: Paul Jahans
-
I have spent almost 2 days trying to create a simple csv file that I can import into Excel. But I am having trouble with UNICODE. This is very simple to do in regular VC++ for desktop PC's, but how do you generate a CSV file using eMbedded VC++? Excel, on my desktop, does not like the CSV file generated from my Window CE computer.:confused: Paul Jahans
You have to translate from UNICODE into MCBS or ANSI. Check the
WideCharToMultiByte
API. -
I have spent almost 2 days trying to create a simple csv file that I can import into Excel. But I am having trouble with UNICODE. This is very simple to do in regular VC++ for desktop PC's, but how do you generate a CSV file using eMbedded VC++? Excel, on my desktop, does not like the CSV file generated from my Window CE computer.:confused: Paul Jahans
Make the first two characters of the CSV file you generate FF FE. This is how a Unicode text file is identified. FE FF is used on some OSes with the other byte ordering. You'll see this if you look at the raw file contents that RegEdit generates when you do a registry export on Windows 2K.