Excel won't open Unicode CSV file from SQL Server

K

kwdavids

I have a CSV file created by Microsoft SQL Server Management Studio in
Unicode (that's all it can do). The file is just some numbers, nothing
fancy. But when I attempt to open the CSV file with Excel 2007, all
the columns are thrown into the first column.

I can manually import the CSV file, through the wizard, tediously
navigating to the file, and specifying delimiters, but that's a pain
to do over and over again.

All I want to do is save a result set in SQL Server and open in in
Excel. Is that too much to ask?

Kevin
 
H

Harlan Grove

kwdavids said:
I have a CSV file created by Microsoft SQL Server Management Studio
in Unicode (that's all it can do). The file is just some numbers,
nothing fancy. But when I attempt to open the CSV file with Excel
2007, all the columns are thrown into the first column.
....

You could fix this from the command prompt. The command

type your-filename-here.CSV > your-filename-here..CSV

will create a plain text CSV file (note the 2 periods - INTENTIONAL!)
from your Unicode CSV file assuming your Windows Regional Settings
locale doesn't use Unicode encoding by default. Then open the derived
CSV file in Excel.
 
K

kwdavids

...

You could fix this from the command prompt. The command

type your-filename-here.CSV > your-filename-here..CSV

will create a plain text CSV file (note the 2 periods - INTENTIONAL!)
from your Unicode CSV file assuming your Windows Regional Settings
locale doesn't use Unicode encoding by default. Then open the derived
CSV file in Excel.

What I did was to change my file extension mapping for CSV from Excel
to OpenOffice. OpenOffice knows how to open Unicode CSV files when you
double-click on them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top