XLSX
You might experience differences from the original files due to known limitations, depending on the file format and non-implemented features. We are constantly improving based on our users' feedback, so feel free to submit any improvement requests
Click in the button below to create a local web-based spreadsheet from a XLSX file.
Requires the parser extension included on the Enterprise Plan
<html>
<script src="https://jspreadsheet.com/v11/jspreadsheet.js"></script>
<script src="https://jsuites.net/v5/jsuites.js"></script>
<link rel="stylesheet" href="https://jspreadsheet.com/v11/jspreadsheet.css" type="text/css" />
<link rel="stylesheet" href="https://jsuites.net/v5/jsuites.css" type="text/css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons" />
<script src="https://cdn.jsdelivr.net/npm/jszip@3.6.0/dist/jszip.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@jspreadsheet/parser/dist/index.min.js"></script>
<div id="table1"></div>
<input type="file" name="file" id='file' style="display: none">
<input type='button' value='Load a XLSX file from my local computer' id="loadlocal">
<script>
// Set license
jspreadsheet.setLicense('N2I3NTYwOTk2ZGJkMGZiNTZkNmUxMTdlNGJjMzMwMjg3NWZiYTY4OTIzYzliNTAzYmExYjBhODQ3YjQ0YTMyNjEwMDU4M2QwNjY4NDQwMGMxNGFhOGY4MDUzMTRmOGI0NWMyOTVjZmE5NmQzZGExMWMxN2I0ZGQ3ZWQwMWFlZWMsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpNek5UUTNNelU0TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0ozWldJaUxDSnNiMk5oYkdodmMzUWlYU3dpY0d4aGJpSTZJak0wSWl3aWMyTnZjR1VpT2xzaWRqY2lMQ0oyT0NJc0luWTVJaXdpZGpFd0lpd2lkakV4SWl3aVkyaGhjblJ6SWl3aVptOXliWE1pTENKbWIzSnRkV3hoSWl3aWNHRnljMlZ5SWl3aWNtVnVaR1Z5SWl3aVkyOXRiV1Z1ZEhNaUxDSnBiWEJ2Y25SbGNpSXNJbUpoY2lJc0luWmhiR2xrWVhScGIyNXpJaXdpYzJWaGNtTm9JaXdpY0hKcGJuUWlMQ0p6YUdWbGRITWlMQ0pqYkdsbGJuUWlMQ0p6WlhKMlpYSWlMQ0p6YUdGd1pYTWlYU3dpWkdWdGJ5STZkSEoxWlgwPQ==');
// Set extensions
jspreadsheet.setExtensions({ parser });
// Create the spreadsheet from a local file
let load = function(e) {
// Parse XLSX file and create a new spreadsheet
jspreadsheet.parser({
file: e.target.files[0],
// It would be used to updated the formats only
locale: 'en-GB',
onload: function(config) {
jspreadsheet(document.getElementById('table1'), config);
},
onerror: function(error) {
alert(error);
}
});
}
document.getElementById("loadlocal").onclick = () => document.getElementById('file').click()
document.getElementById("file").onchange = (event) => load(event)
</script>
</html>
import React, { useRef } from "react";
import { jspreadsheet } from "@jspreadsheet/react";
import parser from "@jspreadsheet/parser";
import "jsuites/dist/jsuites.css";
import "jspreadsheet/dist/jspreadsheet.css";
// Set license
jspreadsheet.setLicense('N2I3NTYwOTk2ZGJkMGZiNTZkNmUxMTdlNGJjMzMwMjg3NWZiYTY4OTIzYzliNTAzYmExYjBhODQ3YjQ0YTMyNjEwMDU4M2QwNjY4NDQwMGMxNGFhOGY4MDUzMTRmOGI0NWMyOTVjZmE5NmQzZGExMWMxN2I0ZGQ3ZWQwMWFlZWMsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpNek5UUTNNelU0TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0ozWldJaUxDSnNiMk5oYkdodmMzUWlYU3dpY0d4aGJpSTZJak0wSWl3aWMyTnZjR1VpT2xzaWRqY2lMQ0oyT0NJc0luWTVJaXdpZGpFd0lpd2lkakV4SWl3aVkyaGhjblJ6SWl3aVptOXliWE1pTENKbWIzSnRkV3hoSWl3aWNHRnljMlZ5SWl3aWNtVnVaR1Z5SWl3aVkyOXRiV1Z1ZEhNaUxDSnBiWEJ2Y25SbGNpSXNJbUpoY2lJc0luWmhiR2xrWVhScGIyNXpJaXdpYzJWaGNtTm9JaXdpY0hKcGJuUWlMQ0p6YUdWbGRITWlMQ0pqYkdsbGJuUWlMQ0p6WlhKMlpYSWlMQ0p6YUdGd1pYTWlYU3dpWkdWdGJ5STZkSEoxWlgwPQ==');
// Set extensions
jspreadsheet.setExtensions({ parser });
// Create the spreadsheet from a local file
const load = function(e) {
// Parse XLSX file and create a new spreadsheet
jspreadsheet.parser({
file: e.target.files[0],
// It would be used to updated the formats only
locale: 'en-GB',
onload: function(config) {
jspreadsheet(spreadsheet.current, config);
},
onerror: function(error) {
alert(error);
}
});
}
export default function App() {
// Spreadsheet array of worksheets
const spreadsheet = useRef();
// Render component
return (
<>
<div ref={spreadsheet}></div>
<input type={"file"} name={"file"} id={"file"} onChange={load} style={{ display: 'none' }} />
<input type={"button"} value={"Load a XLSX file from my local computer"}
onClick={() => document.getElementById("file").click()}>
</>
);
}
<script>
import { ref } from "vue";
import jspreadsheet from "jspreadsheet";
import "jspreadsheet/dist/jspreadsheet.css";
import "jsuites/dist/jsuites.css";
export Grid {
name: "Jspreadsheet",
setup(props) {
const sheetEl = ref(null);
const file = ref(null);
file.value.onchange = function() {
// Parse XLSX file and create a new spreadsheet
jspreadsheet.parser({
file: e.target.files[0],
// It would be used to updated the formats only
locale: 'en-GB',
onload: function(config) {
jspreadsheet(sheetEl.value, config);
},
onerror: function(error) {
alert(error);
}
});
}
return { sheetEl };
},
template: `<div ref="sheetEl" />
<input ref="file" type="file" name="file" style="display:none" />
<input type="button" value="Load a XLSX file from my local computer" @click="this.$refs.file.value.click()"/>`,
};
</script>
import { Component, ViewChild, ElementRef } from "@angular/core";
import jspreadsheet from "jspreadsheet";
import "jspreadsheet/dist/jspreadsheet.css"
import "jsuites/dist/jsuites.css"
import parser from "@jspreadsheet/parser";
// Set your JSS license key (The following key only works for one day)
jspreadsheet.setLicense('N2I3NTYwOTk2ZGJkMGZiNTZkNmUxMTdlNGJjMzMwMjg3NWZiYTY4OTIzYzliNTAzYmExYjBhODQ3YjQ0YTMyNjEwMDU4M2QwNjY4NDQwMGMxNGFhOGY4MDUzMTRmOGI0NWMyOTVjZmE5NmQzZGExMWMxN2I0ZGQ3ZWQwMWFlZWMsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpNek5UUTNNelU0TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0ozWldJaUxDSnNiMk5oYkdodmMzUWlYU3dpY0d4aGJpSTZJak0wSWl3aWMyTnZjR1VpT2xzaWRqY2lMQ0oyT0NJc0luWTVJaXdpZGpFd0lpd2lkakV4SWl3aVkyaGhjblJ6SWl3aVptOXliWE1pTENKbWIzSnRkV3hoSWl3aWNHRnljMlZ5SWl3aWNtVnVaR1Z5SWl3aVkyOXRiV1Z1ZEhNaUxDSnBiWEJ2Y25SbGNpSXNJbUpoY2lJc0luWmhiR2xrWVhScGIyNXpJaXdpYzJWaGNtTm9JaXdpY0hKcGJuUWlMQ0p6YUdWbGRITWlMQ0pqYkdsbGJuUWlMQ0p6WlhKMlpYSWlMQ0p6YUdGd1pYTWlYU3dpWkdWdGJ5STZkSEoxWlgwPQ==');
// Set the extensions
jspreadsheet.setExtensions({ parser });
@Component({
standalone: true,
selector: "app-root",
template: `<div #spreadsheet></div>
<input #file type="file" name="file" style="display:none" />
<input type="button" value="Load a XLSX file from my local computer" (click)="this.file.click()"/>`
})
export class AppComponent {
@ViewChild("spreadsheet") spreadsheet: ElementRef;
@ViewChild("file") file: ElementRef;
ngAfterViewInit() {
let spreadsheet = this.spreadsheet.nativeElement;
// Add event to the file input
this.file.nativeElement.onchange = function (e) {
// Parse XLSX file and create a new spreadsheet
jspreadsheet.parser({
file: e.target.files[0],
locale: "en-GB",
onload: function (config) {
jspreadsheet(spreadsheet, config);
},
onerror: function (error) {
alert(error);
}
});
};
}
}