Exporting data from Highcharts Grid
Highcharts Grid Pro supports exporting the grid data to CSV and JSON formats.
The exporting API on a grid instance provides methods for exporting data:
grid.exporting.downloadCSV(): Downloads the CSV string as a file.grid.exporting.getCSV(): Returns the CSV string.grid.exporting.downloadJSON(): Downloads the JSON string as a file.grid.exporting.getJSON(): Returns the JSON string.
Basic usage
const grid = Grid.grid('container', {data: {columns: {product: ['Apple', 'Pear', 'Plum'],price: [1.5, 2.53, 5]}}});// Download files:grid.exporting.downloadCSV();grid.exporting.downloadJSON();
Get export data as strings
const csv = grid.exporting.getCSV();const json = grid.exporting.getJSON();console.log(csv);console.log(json);
API reference
See the exporting sample.