vue3项目SpreadJS使用
前段时间接到一个需求,需要在项目中使用到SpreadJS,第一次接触SpreadJS,感觉这个表格控件的功能真的是非常的强大,基本满足excel的使用功能,目前发现的不足就是,当json文件中数据量大,包含大量计算公式时,首次的渲染可能较慢,还有的就是要收费。
- 安装依赖
由于项目中使用的是13.2.0的版本,所以文章针对该版本阐述,可根据个人需求安装依赖
"@grapecity/spread-excelio": "^13.2.0",
"@grapecity/spread-sheets": "^13.2.0",
"@grapecity/spread-sheets-resources-zh": "^13.2.0",
"@grapecity/spread-sheets-vue": "^13.2.0",
2、引入依赖(可在main文件或使用组件中引入和授权)
import GC from "@grapecity/spread-sheets";
import "@grapecity/spread-sheets-vue";
import "@grapecity/spread-sheets-resources-zh";
import ExcelIO from "@grapecity/spread-excelio";
import "@grapecity/spread-sheets/styles/gc.spread.sheets.excel2016colorful.css";