This content has been marked as final. Show 3 replies
Probably not the answer you want to hear... I have my datagrid grid populating by an HTTPService exposed through mod_perl, that returns XML data. I created a little button to export to CSV for each table, have that use navigateToURL(...) to popup a new window where the url is the address of another Perl service that returns the same data as a .csv attachment (set through HTTP headers).
I can send your clearer instructions on this if it is something you'd want to follow through on. If there is a cleaner solution, I'd also like to hear about it...
We use System.setClipboard to push stuff into the clipboard. Excel expects tab (slash t) separated columns and new line (slash n) separated rows.
dataGrid.columns gives you the columns
dataGrid.dataProvider the underlying data
to loop over the data of a grid and push the data into the clipboard and then tell the user to paste it.
No trip to the server required.
Hope this helps.
I'm trying to do the same thing: in my application I have a datagrid and I have a button to export the datagrid in Excel. When the user click on the button, I need to open a new html window where the data are showed in the excel format (nay be also csv).
Any suggestion will be appreciated.
Thank you very much.