Script to convert a table into a CSV file on the client side via javascript in a way that is Sofa King simple for developers and users.
IMO there's no need for a trip the server with separate code to handle this... the data is already right there in front of the user! It just needs to be formatted and served in a nice package.
GOALS:
- Single-Click to CSV for user.
- Simple drop-in script for developer, no dependencies.*
- Clean data (no links, images, etc.), all characters properly rendered.
- Works for large and small tables (some methods don't work above 3000 chars or so).
- Works in all browsers (desktop).**
*Current script relies on jQuery, but it should be easy to get rid of that. **IE is a no-go at the moment.
The base code I started with came from: http://jsfiddle.net/terryyounghk/KPEGU/