Select column from a table with Google Chrome

76

19

Is there an extension for Google Chrome that would allow me to select a column from a table on the webpage? For example when I want to copy text from just one column of a table.

You can select any row or column in Firefox by holding the Ctrl key, and I was wondering if a similar feature is available in Chrome.

kristof

Posted 2011-07-28T16:54:59.717

Reputation: 1 464

8Copying columns from tables is why I keep Firefox installed. – Colonel Panic – 2014-05-21T10:11:48.870

Answers

56

Sorry to dig up an old thread, but this might help someone in the future. I wrote a Chrome extension called ColumnCopy which accomplishes this task.

James Andres

Posted 2011-07-28T16:54:59.717

Reputation: 684

1+1 Great work! It solved my problem. But as hakre said, it's better to have more features like selecting, – lesca – 2016-07-05T01:00:55.353

I installed and used your extension, worked on a w3schools table example page, didn't work in the HTML table (I checked source, WAS table.) document I was trying. So I deactivated it. Tried another extension on this page in same way. After I was done, I suddenly realized my clipboard STOPPED WORKING altogether. Have to reboot! Don't know which one it is, obviously. – Dreamspace President – 2018-05-11T04:31:01.983

2Is there a reason why your extension adds its Google Analytics stuff to every page? – georg – 2013-05-16T12:44:42.960

2

Hi @thg435, no not really other than I followed the guide on http://developer.chrome.com/extensions/tut_analytics.html. My goal was to track to copy column vs. copy table events. That info is helpful for improving the app. You are welcome to check out the code at https://github.com/jamesandres/ColumnCopy and submit a pull request if you find a better approach. Thanks :)

– James Andres – 2013-05-22T16:10:31.003

This extension is great, but it strips html and links. Any way around that? – Artem Russakovskii – 2013-08-18T18:41:44.597

@ArtemRussakovskii not at the moment. A few people have requested this and there is a ticket open for it here https://github.com/jamesandres/ColumnCopy/issues/7. I'll get to it as free time permits. Feel free to submit a patch!

– James Andres – 2013-08-27T14:04:41.067

-1 because it ain't do it like firefox does :) It's not selecting, it's copying already. – hakre – 2014-05-14T07:29:14.060

28

Another hack - copy the whole table from Chrome to Excel then copy the column. I use this to grab the stock ticker column from a stock screen.

Works using LibreOffice Calc as well.

J Kent Berkeley

Posted 2011-07-28T16:54:59.717

Reputation: 281

3Until the table has 25 columns and 35k rows with a total size of almost 2 MB for the full contents as text :) – Juha Untinen – 2015-12-08T08:14:08.683

14

Here's another one (mine): copytables.

Allows you to select columns, rows and arbitrary areas in a table and copy in different formats.

georg

Posted 2011-07-28T16:54:59.717

Reputation: 241

you wrote this extension? You are the best. this is by for the best extention for this purpose! 5 star – matthy – 2015-11-20T14:34:34.623

@hakre this one works like Firefox does! – arekolek – 2015-12-14T21:34:04.430

Should be voted much higher. Thanks for the shortcuts and the decent context menu, in case you forget them. Good work. – Kai Noack – 2016-08-14T14:59:42.347

I installed and used your extension, worked on a w3schools table example page, didn't work in the HTML table (I checked source, WAS table.) document I was trying. So I deactivated it. Tried another extension on this page in same way. After I was done, I suddenly realized my clipboard STOPPED WORKING altogether. Have to reboot! Don't know which one it is, obviously. – Dreamspace President – 2018-05-11T04:35:54.233

6

Here's a very hacky and somewhat inconvenient workaround: you can use the "Transpose Tables" bookmarklet located on this website to transpose the rows and columns of the tables on the page, and then select the appropriate row. Certainly not ideal, but it's the best thing I was able to find.

Mitch Lindgren

Posted 2011-07-28T16:54:59.717

Reputation: 142

This is good because it doesn't require installing any extensions. – Solomon Ucko – 2018-01-10T14:14:25.533

Clever hack. But a hack! – mdoar – 2011-09-15T17:01:57.200

5

With this nice chrome extension Cellect , just like Excel , you can easily select and copy single/multiple cell/row/column/whole table ,by pressing Shift + click/drag to select like what you do in Firefox by CTRL.

Mahdi Rabie

Posted 2011-07-28T16:54:59.717

Reputation: 166

1

Without installing any extension:

Open console and type:

document.getElementsByTagName('table')

If there is more than one, use the index for the desired table. In my case I want the first table so I use 0 as the index:

document.getElementsByTagName('table')[0]

Define column you want (first column is 0):

column = 0

And this is the final code:

Array.from(document.getElementsByTagName('table')[0].getElementsByTagName('tr'))
    .map(tr => tr.getElementsByTagName('td'))
    .filter(td => td.length > 0)
    .map(td => td[column].innerHTML)

Now you have the output, which you can copy from the console, e.g. ["Item 1", "Item 2", "Item 3"]

Michal Kováč

Posted 2011-07-28T16:54:59.717

Reputation: 171

1

You could also use either of these bookmarklets:

http://w-shadow.com/bookmarklet-combiner/?bookmarklet=2125 http://www.kunalbabre.com/projects/table2CSV.php

to copy out the data as CSV. Then paste that CSV data into excel, and click the column you want in excel and copy that.

Brad Parks

Posted 2011-07-28T16:54:59.717

Reputation: 1 775

0

here is another column/cell copy extension for Chrome Browser. https://chrome.google.com/webstore/detail/table-range-select-and-co/klojbfbefcejadioohmnkhjmbmecfapg

  • Alt + Click selects single cells.
  • Ctrls + Click + move selects table ranges exactly like in Firefox.

Java

Posted 2011-07-28T16:54:59.717

Reputation: 1

1Link only answer is useless, especially when it will be broken. Can you elaborate on this a little more? – Toto – 2018-06-13T17:29:27.847

Hello please recheck the link its updated. sorry for the broken link – Java – 2018-06-14T13:53:17.973