What's the easiest/fastest way to grab data out of a YUI DataTable and turn it into a single CSV or TSV string? I basically just want to implement a one-click way to get the entire DataTable (it should preserve the currently-applied sorting) into a form that users can paste into a spreadsheet.
My DataTable can get pretty big - 5000 to 10000 rows, 5 to 10 columns - so efficiency does matter.