|
<ejs-spreadsheet
ref="spreadsheet"
:created="created"
:actionComplete="actionComplete"
:heigth="height"
>
</ejs-spreadsheet>
created: function () {
var spreadsheet = this.$refs.spreadsheet;
var parsedData = JSON.parse(this.response); // Parse the stringified response
spreadsheet.openFromJson({
file: parsedData,
});
// To protect the active sheet.
spreadsheet.protectSheet(1, this.protectSetting);
},
actionComplete: function (args) {
var spreadsheet = this.$refs.spreadsheet;
// To protect the switched sheets
if (args.action === "gotoSheet")
spreadsheet.protectSheet(
args.eventArgs.currentSheetIndex,
this.protectSetting
);
},
|