All examples
basics
Drag & drop spreadsheet upload
Drop any supported file onto a zone and parse it.
A drop zone that accepts files dropped from the desktop and converts them to JSON instantly.
html
<div id="drop" style="padding:40px;border:2px dashed #22d3ee;border-radius:12px">
Drop a spreadsheet here
</div>
<script type="module">
import tabularjs from 'https://cdn.jsdelivr.net/npm/tabularjs/dist/index.js';
const drop = document.getElementById('drop');
drop.addEventListener('dragover', e => e.preventDefault());
drop.addEventListener('drop', async (e) => {
e.preventDefault();
const file = e.dataTransfer.files[0];
const result = await tabularjs(file);
console.log(result);
});
</script>Live Preview
Sample output rendered in Jspreadsheet — upload your own file to try it.
sample-output.xlsx
Drag a file anywhere on this card to replace the sample data

