Hello everyone! I’m using the Grid component in ReactJS and I want to utilize the built-in export feature of the Grid to export data from it. However, I’m encountering the error “Missing reference to ‘jszip.js'” when calling the export function with the ‘xlsx’ format. The export works fine with the ‘csv’ format. Can you help me resolve this issue? I would greatly appreciate any guidance you can provide. Thank you all very much!
Wishing you all a productive day.
this is my code
handleXlsxBtnClick() {
this.grid.current.exportData(‘xlsx’);
}
<Grid ref={this.grid}
id=”grid”
dataSource={this.props.dataSource}
sorting={this.sorting}
filtering={this.filtering}
behavior={this.behavior}
onRowInit={this.onRowInit}
expanded={this.expanded}
selection={this.selection}
columns={this.columns}
columnGroups={this.columnGroups}
onCellDoubleClick={(e) => this.handleSelectionChange(e)}
/>
<div className=”options”>
<div className=”caption” />
<div className=”option”>
<Button id=”xlsxBtn” onClick={this.handleXlsxBtnClick}>Export to Excel</Button>
</div>
</div>