SpreadJS fromJSON 함수는 백그라운드에서 값 및 수식을 로드하는 동안 데이터를 빠르게 표시하는 증분 로드를 지원합니다. 이는 최초 로드 시간을 최적화하기 위해 큰 파일을 가져올 때 권장됩니다.
fromJSON 함수를 사용하여 데이터를 로드하는 경우 증분 로드를 사용하여 백그라운드에서 셀 값과 수식을 로드할 수 있습니다.
incrementalLoading을 true로 설정하거나 옵션에서 callback 함수를 추가할 수 있습니다.
var jsonOptions = {
incrementalLoading: true, // use the incremental loading when converting json to workbook, default value is false
}
var spread = GC.Spread.Sheets.findControl(document.getElementById('ss'));
spread.fromJSON(JSON.parse(jsonStr), jsonOptions);
incrementalLoading의 callback 함수로 로드 상태를 가져오거나 로드 완료 시 작업을 설정할 수 있습니다.
var jsonOptions = {
incrementalLoading: {
loading: function (progress, args) {
// The loading progress from 0 to 1.
// args.sheet the sheet currently loading
},
loaded: function () {
// The works to do when loading finish.
}
},
}
var spread = GC.Spread.Sheets.findControl(document.getElementById('ss'));
spread.fromJSON(JSON.parse(jsonStr), jsonOptions);
fromJSON 함수를 사용하여 데이터를 로드하는 경우 증분 로드를 사용하여 백그라운드에서 셀 값과 수식을 로드할 수 있습니다.
incrementalLoading을 true로 설정하거나 옵션에서 callback 함수를 추가할 수 있습니다.
var jsonOptions = {
incrementalLoading: true, // use the incremental loading when converting json to workbook, default value is false
}
var spread = GC.Spread.Sheets.findControl(document.getElementById('ss'));
spread.fromJSON(JSON.parse(jsonStr), jsonOptions);
incrementalLoading의 callback 함수로 로드 상태를 가져오거나 로드 완료 시 작업을 설정할 수 있습니다.
var jsonOptions = {
incrementalLoading: {
loading: function (progress) {
// The loading progress from 0 to 1.
},
loaded: function () {
// The works to do when loading finish.
}
},
}
var spread = GC.Spread.Sheets.findControl(document.getElementById('ss'));
spread.fromJSON(JSON.parse(jsonStr), jsonOptions);