You're looking at DataGridXL v1. Click here to go to the latest version.

Load and save CSV file

Importing CSV data

Use PapaParse to load remote CSV data. PapaParse loads your data and converts it to an array of objects that is compatible with DataGridXL.

Hit the Browse-button to load one of your local CSV-files into the sheet. If you don't have a CSV-file lying around, you can download this mock-data first, then load it in to the grid.


#grid {
  height: 400px;

#toolbar {
	background: #cbe4ff;
	margin-bottom: 12px;
	padding: 8px;

	display: flex;
	justify-content: space-between;

<div id="toolbar" class="dgxl-app">
		<input type="file" id="csv-file" name="files-csv" class="custom-file-input" accept=".csv"><label for="csv-file">Browse…</label>
		<button class="button" id="button-save">Save</button>

<div id="grid"></div>

<script src=""></script>
<!-- Papa Parse (to import and parse CSV files) -->
<script src="/site_files/libs/papaparse/papaparse.min.js"></script>
var csvFile = document.getElementById("csv-file");

// create empty grid
var grid = new DataGridXL("grid", {
  data: DataGridXL.createEmptyData(20,20)

csvFile.onchange = function(e){
	var file =[0];

	console.log("FILE", file);

    Papa.parse(file, {
      header: true,
      dynamicTyping: true,
      complete: function(results) {

        console.log("DATA", results);

        // this should clear all that's inside "grid" dom node...


        // grid = new DataGridXL("grid", {
        // 	data:
        // });



document.getElementById("button-save").onclick = function(){


Leave email to receive latest updates!