Other resources

  • jExcel CE
    Jexcel community edition
  • jTools
    Web components, utilities and plugins
  • Merged cells

    You can merge cells on your spreadsheet in the table initialization or by javascript as follow:


    After the initialization is still possible to merge or destroy the cell programmatically.

    table.setMerge('A3', 2, 2);
    table.removeMerge('A3');
    table.getMerge('A1');
    table.getMerge();
    table.destroyMerged();


    Source code

    <html>
    <script src="https://jexcel.net/v3/jexcel.js"></script>
    <script src="https://jexcel.net/v3/japp.js"></script>
    <link rel="stylesheet" href="https://jexcel.net/v3/jexcel.css" type="text/css" />
    <link rel="stylesheet" href="https://jexcel.net/v3/japp.css" type="text/css" />
    
    <div id="spreadsheet"></div>
    
    <script>
    var data = [
        ['Mazda', 2001, 2000, '2006-01-01'],
        ['Pegeout', 2010, 5000, '2005-01-01'],
        ['Honda Fit', 2009, 3000, '2004-01-01'],
        ['Honda CRV', 2010, 6000, '2003-01-01'],
    ];
    
    var table = jexcel(document.getElementById('spreadsheet'), {
        data:data,
        colHeaders: ['Model', 'Year', 'Price', 'Date'],
        colWidths: [ 300, 80, 100, 100 ],
        columns: [
            { type: 'text' },
            { type: 'text' },
            { type: 'text' },
            { type: 'calendar' },
        ],
        mergeCells:{
            A1:[2,1]
        }
    });
    </script>
    </html>