CSV from HTML tables Bookmarklet

For each table on the current page, append a box with CSV of that table for an easy export.

Make sure the current page uses jQuery or apply jQuerify before using this bookmarklet.

Source (snipt.net)


Download Bookmarklet:


View Bookmarklet Code:

Bookmarklet Source Code:

javascript%3A%28function%28%29%7B%24%28%27table%27%29.each%28function%28%29%7Bvar%20%24table%3D%24%28this%29%3B%24%28%27%3Ctextarea%3E%27%29.css%28%27width%27%2C%24table.width%28%29%29.css%28%27height%27%2C%27400px%27%29.html%28%24.map%28%24table.find%28%27tr%27%29%2Cfunction%28tr%29%7Breturn%20%24.map%28%24%28tr%29.find%28%27th%2C%20td%27%29%2Cfunction%28e%29%7Breturn%27%22%27+%24%28e%29.text%28%29.replace%28%27%22%27%2C%27%22%22%27%29.replace%28%27%5Cn%27%2C%27%20%27%29+%27%22%27%7D%29.join%28%27%2C%27%29%7D%29.join%28%27%26%2313%3B%26%2310%3B%27%29%29.insertAfter%28%24table%29%3B%7D%29%7D%29%28%29


Rate it:


Tags:

Comments

Comments so far. Add yours.

Joel

"CSV from HTML tables" sounds like a good tool. But it requires the page to have jQuery.

Now that "jQuerify" adds jQuery only if it is not already included in a page, we can combine the 2 tools, using http://w-shadow.com/bookmarklet-combiner/.

The resulting bookmarklet is "CSV from HTML tables (includes jQuerify)", which can be grabbed from http://w-shadow.com/bookmarklet-combiner/?bookmarklet=2125