Loading from JSON

Loading from json and keep the references






Source code

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

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

<script>
var data = [
    {
        name:'Jorge',
        id:'3',
        age:'40',
        gender:'Male'
    },
    {
        name:'Rogerio Sergio',
        id:'4',
        age:'48',
        gender:'Male'
    },
    {
        name:'Jorgina Santos',
        id:'5',
        age:'32',
        gender:'Female'
    },
    {
        name:'Arnaldo Antunes',
        id:'6',
        age:'63',
        gender:'Male'
    },
];

jexcel(document.getElementById('spreadsheet'), {
    json: data,
    columns: [
        {
            type:'text',
            width:'300',
            name:'id'
        },
        {
            type:'text',
            width:'200',
            name:'name'
        },
        {
            type:'text',
            width:'100',
            name:'age'
        },
        {
            type:'hidden',
            name:'gender'
        },
     ],
     license: 'YjQzMzdlOTRiOGY3ZTQ0ZDQ4ZTI1YWU3MDFjMDI0ZWJmOTNjODA1NWFiZTRiNDJhNmRiYTJlZjkwODQ3N2IwMWRmNWRjYWUwZDViM2VhMmI3NzVjOTcwMzVlN2ZhODI1Y2EyMmE3NDI0ZmE0ZjVmNGQ2MWEzN2M3MTA4MThhMDUsZXlKdVlXMWxJam9pY0dGMWJDNW9iMlJsYkNJc0ltUmhkR1VpT2pFMk16SXdPVEkwTURBc0ltUnZiV0ZwYmlJNld5SnFjMlpwWkdSc1pTNXVaWFFpTENKcVpYaGpaV3d1Ym1WMElpd2lZMjlrWlhOaGJtUmliM2d1YVc4aUxDSnFjMmhsYkd3dWJtVjBJaXdpTVROemQyMHVZM05pTG1Gd2NDSXNJbXh2WTJGc2FHOXpkQ0pkTENKd2JHRnVJam9pTXlKOQ==',
});
</script>

<textarea id='log' style='width:400px;height:100px;'></textarea>

<input type='button' onclick="document.getElementById('log').value =
    JSON.stringify(document.getElementById('spreadsheet').jexcel.getJson())"
    value='Get JSON'>
    
</html>