Copy to Clipboard include column names

Completed

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

Chris

11 comments
Comment actions Permalink

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

Regards,
Alexander.

0
Comment actions Permalink

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
Comment actions Permalink

sadly. Excel format can not be exported.

1
Comment actions Permalink

That's terrible

 

0
Comment actions Permalink

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

0
Comment actions Permalink

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.

4
Comment actions Permalink

You can configure import/export format:

1
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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

Please sign in to leave a comment.