Toad World® Forums

Cut/paste with column names


#1

I installed 10.5.1 on a new PC. In my old installation, when I copied rows from a grid and pasted them into Excel, the column names would be included in the copy/paste. Now, only the data is pasted.

How do I set up Toad so the column names will also be copied and pasted?

Thank you


#2

Use SHIFT+INSERT instead of Ctrl+C, that will grab the column headers.


#3

More specifically, I run a query in the Editor such as:

SELECT *
FROM dm_ps_uom

This returns 50 rows.

I click in the Data Grid, then from the Edit menu, I select “Select All”, then “Copy”. Over in Excel, I rigth click and select “Paste”. In my previous 9.6 version, it would paste with column names.

I tried the SHIFT+INSERT, but that didn’t work.


#4

Not sure why SHIFT+INSERT wouldn’t work for you…sorry, maybe
someone else will have an idea.


#5

I made a select query

in the grid window I click right mouse button

save as from the popup menu

then comes the “save grid contents”

I take the tab delimiter

if I want the column names I check the “include column headers”

also can check the submenu (in) lowercase

save to - clipboard

submit with ok

then paste it to excel.

work perfect

but,

if some fields include CR

it destroy the order in the tab delimiter.

in this case

I take the xls instance instead of tab delimiter

then I send it to file.

and open the file in excel.

the fields with the CR comes correctly to excel.

sorry my poor English


#6

This is helpful and does bring the column names, but sometimes, I may only want to copy one or two records instead of the entire data set.

I would think there is something in Toad Options, but I can’t figure out what it is.


#7

The way it should work, select the rows you want using multi-select (ensure ROW
SELECT is enabled in grid), then just use SHIFT+INSERT, you’ll get
just the rows you want and the column headers.

You can also just grab the selected rows with the Export/SaveAs dialog –
there’s a check box for that, but won’t be as quick as using the KB.


#8

The shortcut that you are looking for is CTRL+Insert. This will copy with
column headers.

Shift+Insert is another shortcut for pasting.


#9

There is a checkbox in the Export Data window called “Export only selected
rows”. Maybe this is what you’re looking for?


#10

They’re switched on my KB apparently


#11

CTRL+Insert :slight_smile:

Not sure why Shift+Insert copies for you, but the standard shortcut for
pasting is CTRL+V or CTRL+Insert.


#12

My brain said shift, but my fingers said ctrl.


#13

hi Harold,

Right click on any cell in the data grid and select export dataset ,select the export format as Excel select the location where you want to save the file and click ok…
data with column names will be exported no need to copy/paste option…

regards,
latheesh