Jexcel | Exporting the data from a table

Exporting data from your spreadsheet table.

by Spreadsheet Online

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://bossanova.uk/components/bossanova-ui/css/jquery.jexcel.css">
<script src="https://bossanova.uk/components/bossanova-ui/js/jquery.jexcel.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-csv/0.8.3/jquery.csv.min.js"></script>
<div id='my'></div>

<p>
<button id='upload'>Convert to CSV</button>
<button id='json'>Convert to JSON</button>
</p>

<textarea id='txt' style='width:400px;height:120px'></textarea>

JavaScript

$('#my').jexcel({
    csv:'https://bossanova.uk/components/bossanova-ui/demo/demo1.csv',
    csvHeaders:true,
    colWidths: [70, 200, 300],
});

$('#upload').on('click', function () {
  var data = $('#my').jexcel('getData');
	$('#txt').val($.csv.fromArrays(data));
})

$('#json').on('click', function () {
  var data = $('#my').jexcel('getData');
	$('#txt').val(JSON.stringify(data));
})