Autonumber

The native auto increment column type



Source code

<html>
<script src="https://jexcel.net/v5/jexcel.js"></script>
<script src="https://jexcel.net/v5/jsuites.js"></script>
<link rel="stylesheet" href="https://jexcel.net/v5/jexcel.css" type="text/css" />
<link rel="stylesheet" href="https://jexcel.net/v5/jsuites.css" type="text/css" />


<div id="spreadsheet"></div>

<script>
var data = [
    ["1","DIVINELY UNINSPIRED TO A HELLISH EXTENT","LEWIS CAPALDI"],
    ["2","NO 6 COLLABORATIONS PROJECT","ED SHEERAN"],
    ["3","THE GREATEST SHOWMAN","MOTION PICTURE CAST RECORDING"],
    ["4","WHEN WE ALL FALL ASLEEP WHERE DO WE GO","BILLIE EILISH"],
    ["5","STAYING AT TAMARA'S","GEORGE EZRA"],
    ["6","BOHEMIAN RHAPSODY - OST","QUEEN"],
    ["7","THANK U NEXT","ARIANA GRANDE"],
    ["8","WHAT A TIME TO BE ALIVE","TOM WALKER"],
    ["9","A STAR IS BORN","MOTION PICTURE CAST RECORDING"],
    ["10","YOU'RE IN MY HEART","ROD STEWART"]
];

jexcel(document.getElementById('spreadsheet'), {
    data: data,
    columns: [
        { type: 'autonumber', title: 'Id', readOnly: true },
        { type: 'text', width: '350px', title: 'Title' },
        { type: 'text', width: '250px', title: 'Artist' },
     ],
     license: '39130-64ebc-bd98e-26bc4',
});
</script>
</html>