Options

VSQL output to excel

Hello, is it possible to use vsql to output the query result to an excel file?
is it possible to append to an existing file?
is it possible to add sheets to an existing excel file?
is it possible to create an excel file with more than 1 sheet?

Tagged:

Answers

  • Options
    moshegmosheg Vertica Employee Administrator

    From Vertica's vsql command-line tool, you cannot directly create an Excel file.
    However, you can generate CSV output from Vertica using vsql and then convert that CSV file to an Excel file.
    For example:

    vsql -F"," -Atc "Your Query;" > Your_file_name.csv
    

    You can also query Vertica from excel after setting up an ODBC DSN.

    For example,
    1. double click in windows on ODBC_WINDOWS64bit_Vertica-client-xyz.exe
    2. Open the ODBC Administrator
    (For example, Start > Control Panel > Administrative Tools > Data Sources (ODBC)) --> at system DSN add Vertica
    3. Open Excel and from the menu, select Data > Get External Data > From Other Sources > From Microsoft Query.

  • Options
    edited July 2023

    @mosheg said:
    From Vertica's vsql command-line tool, you cannot directly create an Excel file.
    However, you can generate CSV output from Vertica using vsql and then convert that CSV file to an Excel file.
    For example:

    vsql -F"," -Atc "Your Query;" > Your_file_name.csv
    

    You can also query Vertica from excel after setting up an ODBC DSN slope game.

    For example,
    1. double click in windows on ODBC_WINDOWS64bit_Vertica-client-xyz.exe
    2. Open the ODBC Administrator
    (For example, Start > Control Panel > Administrative Tools > Data Sources (ODBC)) --> at system DSN add Vertica
    3. Open Excel and from the menu, select Data > Get External Data > From Other Sources > From Microsoft Query.

    Thanks, I will check it and let you know.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file