There are two ways to do this:
1) if you are getting data from a server, modify the data source to provide a CSV of the data on demand (in addition to providing the data in the way you usually get it).
2) if that is not feasible, you can use this hack I wrote to accomplish something similar:
http://jsfiddle.net/asgallant/MqERY/3/ (the relevant code is down at the bottom, in the "ready" event handler). The hack isn't perfect, but it does work.