Documentation

Examples

A custom design for your javascript spreadsheet

The following example shows alternative design for your spreadsheet.


Bootstrap like table spreadsheet



Source code

<html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jexcel/1.5.7/js/jquery.jexcel.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jexcel/1.5.7/css/jquery.jexcel.bootstrap.min.css" type="text/css" />

<div id="my"></div>

<script>
data = [
    ['BR', 'Cheese', 1, 1900.01],
    ['CA', 'Apples', 0, 1200.21],
    ['US', 'Carrots', 1, 400.34],
    ['GB', 'Oranges', 0, 900.43],
];

$('#my').jexcel({
    data:data,
    colHeaders: ['Country', 'Food', 'Stock', 'Price'],
    colWidths: [ 300, 100, 100, 100 ],
    colAlignments: [ 'left', 'left', 'left', 'left' ],
    columns: [
        { type: 'autocomplete', url:'/jexcel/countries' },
        { type: 'autocomplete', source:['Apples','Bananas','Carrots','Oranges','Cheese'] },
        { type: 'checkbox' },
        { type: 'number' },
    ]
});
</script>
</html>

Buy me a beer?