这里有一点需要注意:
在使用框架时,ExcelIO(Excel导入导出功能)需要额外单独进行授权,授权的license与SpreadJS相同,以下面代码为例:
import React from 'react';
import './App.css';
import GC from '@grapecity/spread-sheets';
import { SpreadSheets, Worksheet } from '@grapecity/spread-sheets-react';// 导入ExcelIO模块
import * as spreadExcel from '@grapecity/spread-excelio';// 导入文件保存模块
import saveAs from 'file-saver';GC.Spread.Sheets.LicenseKey = spreadExcel.LicenseKey = "your key";