SqlDbx Forum

SqlDbx

You are not logged in.

#1 2017-10-25 03:46:08

chingiis
Member

Exported csv file is not seperated by columns

Hi everyone!

I try to export csv file from sql dbx with the following code:
GO
cmd export=file U:1/2017-06-23_trades.csv

The problem is that exported file is not separated by columns, all the output from sql is exported in one first column. I tried various formats: csv2 gives me the same result, xlsx and xls can not simply be opened, something wrong happens.
How can I split the output in columns?
May be smth like with headers true or smth else?

Best regards

Offline

#2 2017-10-25 05:58:07

geo
Member

Re: Exported csv file is not seperated by columns

your column separator might be blank, check this setting:
Tools / Options / Import-export / Field delimiter

Offline

#3 2017-10-27 05:04:34

chingiis
Member

Re: Exported csv file is not seperated by columns

And which sign I need to put in order to export by separate columns? Thank You!

Offline

#4 2017-10-27 19:12:36

geo
Member

Re: Exported csv file is not seperated by columns

By default, Excel expects this to match the list separator in the regional settings (control panel),
i.e. a comma if you write -1.5 and a semicolon if you write -1,5 in your region.
You can also explicitly tell Excel which separator to look for by manually editing the file and adding
sep=;
as the first line (replace ; as needed).

Or, you could try "cmd export excel" instead of "cmd export file".

Offline

Board footer

Powered by FluxBB