Posted 6 January 2020, 8:05 am EST
Good morning/afternoon.
I’m following this documentation https://www.grapecity.com/spreadjs/docs/v13/online/SpreadJS~GC.Spread.Excel.IO~save.html in order to extract a spreadsheet instance into an xlsx file but I’m getting the error: Cannot read property ‘Evaluation Version’ of undefined as soon as the script runs the function excelIO.save(…
I’m using the latest 13.0.3 packages from npm
and importing them as follow:
import GC from '@grapecity/spread-sheets'
import * as Excel from '@grapecity/spread-excelio'
and running as follow:
const excelIO = new Excel.IO()
const fileName = 'sample.xlsx'
const json = JSON.stringify(this.activeSheet.toJSON())
excelIO.save(
json,
blob => {
console.log('blob', blob)
saveAs(blob, fileName)
},
e => {
console.log(e)
},
)
Logging the json constant and the excelIO returns me respectively the correct data in json format and a compressed object which contains:
q: e {loadType: 1, fileReader: FileReader, passwordFileReader: FileReader, compoundFile: o}
Note: (the import * as Excel) was suggested within the forum by the Grapecity support team.
Note 2: saveAs function is not defined therefore I need to disable my linter in order to silence the error, might it be something missing from the documentation?
