JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://jp.igniteui.com/js/modernizr.min.js"></script>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/infragistics.core.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/infragistics.lob.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/infragistics.excel-bundled.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/infragistics.spreadsheet-bundled.js"></script>
<link href="https://cdn-na.infragistics.com/igniteui/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet"></link>
<link href="https://cdn-na.infragistics.com/igniteui/latest/css/structure/infragistics.css" rel="stylesheet"></link>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/i18n/infragistics-ja.js"></script>
<div id="spreadsheet1"></div>
CSS
.ui-igspreadsheet .ui-menu-item {
white-space: nowrap;
}
JavaScript
$( function () {
if ($("#spreadsheet1").length !== 0) {
$("#spreadsheet1").igSpreadsheet({
height: "600",
width: "100%",
activeWorksheetChanged: function (evt, ui) {
if (ui.newActiveWorksheetName == "Statistics") {
$("#spreadsheet1").igSpreadsheet("option", "activeCell", "E7");
} else {
$("#spreadsheet1").igSpreadsheet("option", "activeCell", "J15");
}
}
});
var workbook = null;
var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://jp.igniteui.com/data-files/statistic.xlsx', true);
xhr.responseType = 'arraybuffer';
xhr.onload = function (e) {
// response is unsigned 8 bit integer
var responseArray = new Uint8Array(this.response);
$.ig.excel.Workbook.load(responseArray, function () {
workbook = arguments[0];
setInitialSettings();
}, function () {
console.log("fail");
})
};
xhr.send();
function setInitialSettings() {
$("#spreadsheet1").igSpreadsheet("option", "workbook", workbook);
var ws = workbook.worksheets("Table data");
$("#spreadsheet1").igSpreadsheet("option", "activeWorksheet", ws);
$("#spreadsheet1").igSpreadsheet("option", "activeCell", "J15");
$("#spreadsheet1").igSpreadsheet("option", "zoomLevel", "95");
}
}
});