Export to XLS

You can now export from Jspreasheet to a XLS file using a export plugin, as below.

Note: A security message should appear due the form the file is generated





Source code

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

<script src="/v7/plugins/download.js"></script>

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

<input type='button' value='Export to XLS'
    onclick="jspreadsheet.download(document.getElementById('spreadsheet'))">

<script>
var data1 = [
    ['Cheese', 10, 6.00, "=B1*C1"],
    ['Apples', 5, 4.00, "=B2*C2"],
    ['Carrots', 5, 1.00, "=B3*C3"],
    ['Oranges', 6, 2.00, "=B4*C4"],
];

var data2 = [
    ['20%', "=SHEET1!D1"],
    ['20%', "=SHEET1!D2"],
    ['20%', "=SHEET1!D3"],
    ['20%', "=SHEET1!D4"],
];

jspreadsheet(document.getElementById('spreadsheet'), [
    {
        data: data1,
        defaultColWidth: '100px',
        minDimensions: [5,5],
        license: 'MmM0YWI0NDU5MmE2NmY3YzlhZTgzY2NmNWEzYzAyNDhlMGNkYzc4NGE0ODZiZWI5MDkxMGUzMTE4YzZhYzU5YzRlNjVkYWY3ZDZmNjFhYjQyZDc2ZWQ5NDg1MWQ3ZTc2NWRjMGMwZjJiZThmMzE4MTNiM2JiZjA0ZDg0NmUxODMsZXlKdVlXMWxJam9pU25Od2NtVmhaSE5vWldWMElpd2laR0YwWlNJNk1UWTJORFF5TWpjME9Dd2laRzl0WVdsdUlqcGJJbXB6Y0hKbFlXUnphR1ZsZEM1amIyMGlMQ0pqYjJSbGMyRnVaR0p2ZUM1cGJ5SXNJbXB6YUdWc2JDNXVaWFFpTENKamMySXVZWEJ3SWl3aWJHOWpZV3hvYjNOMElsMHNJbkJzWVc0aU9pSXpJaXdpYzJOdmNHVWlPbHNpZGpjaUxDSjJPQ0lzSW5ZNUlpd2lZMmhoY25Seklpd2labTl5YlhNaUxDSm1iM0p0ZFd4aElpd2ljR0Z5YzJWeUlpd2ljbVZ1WkdWeUlpd2lZMjl0YldWdWRITWlMQ0pwYlhCdmNuUWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0pkTENKa1pXMXZJanAwY25WbGZRPT0='
    },
    {
        data: data2,
        defaultColWidth: '100px',
        minDimensions: [5,5],
        license: 'MmM0YWI0NDU5MmE2NmY3YzlhZTgzY2NmNWEzYzAyNDhlMGNkYzc4NGE0ODZiZWI5MDkxMGUzMTE4YzZhYzU5YzRlNjVkYWY3ZDZmNjFhYjQyZDc2ZWQ5NDg1MWQ3ZTc2NWRjMGMwZjJiZThmMzE4MTNiM2JiZjA0ZDg0NmUxODMsZXlKdVlXMWxJam9pU25Od2NtVmhaSE5vWldWMElpd2laR0YwWlNJNk1UWTJORFF5TWpjME9Dd2laRzl0WVdsdUlqcGJJbXB6Y0hKbFlXUnphR1ZsZEM1amIyMGlMQ0pqYjJSbGMyRnVaR0p2ZUM1cGJ5SXNJbXB6YUdWc2JDNXVaWFFpTENKamMySXVZWEJ3SWl3aWJHOWpZV3hvYjNOMElsMHNJbkJzWVc0aU9pSXpJaXdpYzJOdmNHVWlPbHNpZGpjaUxDSjJPQ0lzSW5ZNUlpd2lZMmhoY25Seklpd2labTl5YlhNaUxDSm1iM0p0ZFd4aElpd2ljR0Z5YzJWeUlpd2ljbVZ1WkdWeUlpd2lZMjl0YldWdWRITWlMQ0pwYlhCdmNuUWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0pkTENKa1pXMXZJanAwY25WbGZRPT0='
    }
]);
</script>
</html>


Export to XLS plugin

This plugin is free and open source. The official repository: https://github.com/jspreadsheet/plugins



Exporting using Jspreadsheet API

Alternatively, it is possible to export the spreadsheet using Jspreadsheet Api

Jsfiddle example