I have frontend project on vue + javascript and I want to show excel file in browser.
I installed the gridjs-spreadsheet package via npm,
on backend site I convert excel to json:
workbook.Save(stream, SaveFormat.Json);
and then I send the json to the frontend to load it in the viewer.
When I follow gridjs-spreadsheet code example:
const s = new Spreadsheet("#gridjs-demo")
.loadData({}) // load data
.change(data => {
// save data to db
});
// data validation
s.validate()
I receive errors like Property 'change' does not exist on type 'void'. or , Property 'validate' does not exist on type 'void'..
The document is not showing in the viewer, in the console I receive error
ReferenceError: $ is not defined
at e.Xs (xspreadsheet.js:12:1)
at new e (xspreadsheet.js:12:1)
at new e (xspreadsheet.js:12:1)
How should I pass json result to Spreadsheet correctly?
Is any better way to edit xlsx in browser with aspose? We can’t use asp net mvc because we have spa type frontend.