You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to have a 'toCsv' method on the table. This would export headers and table contents to a csv file. I currently hacked this using jQuery but it should be contained within the table itself I think.
So this would work as follows:
# template
<p-datatable #table>...</p-datatable>
<button (click)="tocsv(table.toCsv())">Export to CSV</button>
# component
tocsv(csv: string) {
// Server needs to "download" csv file to browser for IE9 support
http.post('tocsv', {data: csv});
}
I send the csv to the server so the server creates a temporary file to send the the browser. However, it appears that this may be possible in pure JS: stack overflow
This would be even better (as long as IE9 is supported).
The text was updated successfully, but these errors were encountered:
It would be great to have a 'toCsv' method on the table. This would export headers and table contents to a csv file. I currently hacked this using jQuery but it should be contained within the table itself I think.
So this would work as follows:
I send the csv to the server so the server creates a temporary file to send the the browser. However, it appears that this may be possible in pure JS: stack overflow
This would be even better (as long as IE9 is supported).
The text was updated successfully, but these errors were encountered: