Copy to Clipboard include column names

Completed

Is it possible to include column names when copying query results to the clipboard?

Chris

0
12 comments
Avatar
Alexander Chernikov

Yes. A data view (table) context menu, there Data Extractor / Configure Extractors, there in the dialog "Include column names".

Regards,
Alexander.

0

I have install DataGrip 2016.3.3 on unbuntu.  I cannot see this option in my UI anywhere.  I am evaluating if I want to purchase this product or not.  This would be a useful feature.

 

Update, nevermind, found it, first row is header.

 

0

sadly. Excel format can not be exported.

1

Definitely going to be the straw that broke the camel's back.

0

It is really easy to do I will explain next and it does not matter that they can't export to Excel since you can paste special on Excel separate columns by 'tab'.

After selecting the data you want, on the data grid, click on the grid right upper side 'Settings icon', click on 'Settings...', under Tools > Database > CSV Formats, check the checkbox that has label like 'First row s header'. Then, click OK.

Go back to your data grid, click with right button then Dump data > To Clipboard.

Then paste special on Excel (separate by Tab). I use Libreoffice Calc which identifies the separation and also let me choose.

5

You can configure import/export format:

1

I tried checking the "first row is header" box and the headers still don't appear in the output when I dump data to clipboard or when I dump data to a file (CSV). Any pointers?

1

I realized that I needed to highlight the format I want to configure in the upper list ("Comma-separated (CSV)") in order to format the selected format. Now it works.

0

Solution: on dropdown menu uncheck the "Skip Computed Columns":

Rerun you query command and now when you Dump Data To Clipboard, you have the column names row <3

 

0

Spent way too much time researching this issue... and finally the combination of Danielalmeida's and Arthur's suggestions above worked.  Can now set output format to TSV, Dump Data to Clipboard, and paste directly into Excel with headers.  Thanks!

0

Settings-→ Tools -→ CSV Formats -→ TSV -→ check the box “First row is header”.  While copying ( CTRL + C ) the result set make sure TSV is set on top right of the result set. This way , when you paste the clipboard in excel , it will automatically come with column names and tab separated into each cell.

0

Please sign in to leave a comment.