在项目内引入在线编辑器,使用spread.toJSON()获取表格JSON时所有样式和内容丢失,但是使用编辑器的导出功能则能够正确导出JSON
错误的JSON为
- {
- "version": "14.2.5",
- "customList": [],
- "sheets": {
- "Sheet1": {
- "name": "Sheet1",
- "isSelected": true,
- "frozenTrailingRowStickToEdge": true,
- "frozenTrailingColumnStickToEdge": true,
- "theme": "Office",
- "data": {
- "defaultDataNode": {
- "style": {
- "themeFont": "Body"
- }
- }
- },
- "rowHeaderData": {},
- "colHeaderData": {},
- "leftCellIndex": 0,
- "topCellIndex": 0,
- "selections": {
- "0": {
- "row": 0,
- "rowCount": 1,
- "col": 0,
- "colCount": 1
- },
- "length": 1
- },
- "rowOutlines": {
- "items": []
- },
- "columnOutlines": {
- "items": []
- },
- "cellStates": {},
- "states": {},
- "outlineColumnOptions": {},
- "autoMergeRangeInfos": [],
- "shapeCollectionOption": {
- "snapMode": 0
- },
- "index": 0
- }
- }
- }
复制代码
|