Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever you try to copy an HTML table to the pasteboard, it will select by row. Sometimes, I'd like to select by columns. Is there a way to do this? If not out of the box, any extensions that enable this kind of functionality.

share|improve this question

As far as I know, there's no way to do that in Safari or Chrome, but in Firefox you can select ranges of cells by holding option and command.

You could also copy the whole table and paste it to a spreadsheet application or use something like pbpaste | cut -d $'\t' -f3. But it might not work if there are cells that contain br elements or rows that start with empty cells.

I've had to use something like this with a few tables that contained br elements:

ruby -e '`pbpaste`.scan(/<tr>.*?<\/tr>/m).each { |r| puts r.scan(/<td>(.*?)<\/td>/m)[2] }'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.