Skip to main content


Exports data from a grid into a CSV file

csv(config?: object): string;


  • config - (optional) an object with export settings. You can specify the following settings for export to CSV:
    • asFile?: boolean - (optional) defines whether Grid should be exported to a file, true by default. To export Grid only as a CSV string, you need to set asFile:false
    • name?: string - (optional) the name of the exported CSV file (if asFile is not set to false)
    • rowDelimiter?: string - (optional) a newline ("\n") by default. A separator between rows, can be a tab - "\t", or any other value
    • columnDelimiter?: string - (optional) a comma (",") by default. A separator between columns, can be a semicolon - ";", or any other value


A CSV string with Grid data


// default export

// export with config settings
name:"grid_data", // grid data will be exported to a CSV file named "grid_data"
rowDelimiter: "\t", // the tab delimiter will be used to separate rows
columnDelimiter: ";" // the semicolon delimiter will be used to separate columns

Related samples: Grid. Export to xlsx and csv

Related article: Exporting Grid