Re: Table to Excel

Поиск
Список
Период
Сортировка
От Josh Trutwin
Тема Re: Table to Excel
Дата
Msg-id 20090326090512.476f2aa4@sinkhole.intrcomm.net
обсуждение исходный текст
Ответ на Re: Table to Excel  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: Table to Excel  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-sql
On Thu, 26 Mar 2009 08:04:25 +0100
Pavel Stehule <pavel.stehule@gmail.com> wrote:

> hello
> 
> use csv format - excel have to read this format without any format
> 
> COPY tablename TO '...' CSV;

Another possibility that I use often is to set the output to HTML
mode using:

\H

Then set to send query results to a file:

\o myresults.html

Then run a single query:

SELECT col1, col2 FROM foo WHERE bar = '1' ORDER BY baz;

\q

Now you can open your .html file directly into Excel since it's just
a big html table.

Josh


В списке pgsql-sql по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Table to Excel
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Table to Excel