Choose Currency:

Rectangular selections from a Web Page or Text File

I was recently looking at creating a tab-indented list of the Geologic time scale , so visited the Wikipedia page for inspiration.

Table layout of the Geologic time scale

They have a well-laid out table that would do for some of the data, but how to copy it whilst retaining the formatting? A simple Control-C copy grabs the entire page and looses the formatting. It also grabs a lot of extra data, some of which is seen on the right, that will then take much time to delete. There are many other tables like this on the internet. Quite a few of them are specifically coded to stop people scraping their data, so is there a way around this?

Yes there is. The Firefox browser has a feature which allows you to select any row or column in a webpage by holding down the Control key then dragging your mouse across the wanted entries. You can then copy-and-paste them to your text-editor, and then add your desired tab-indentations.

You can also do a similar thing in a text-page, by using the rectangular-selection function of PSPad. To do this, open the file, then click 'Edit > Selection Type > Column Selection'. Click and drag over the area you want, then copy it.

Rectangular selections in a Text File
Web design and photography by   ::   All images and pages on this site are © 2005 - 2017   ::   All rights reserved
Flag Counter