json转表格html(可合并单元的情况)

本文介绍如何使用JSON坐标文件生成表格,详细解释了坐标文件的内容结构,并提供了具体实例。文章涉及的关键步骤包括理解坐标文件格式、解析JSON数据、转换为表格格式。
  1. json坐标文件内容如下{
        "code": 200,
        "data": {
            "prism_tablesInfo": [
                {
                    "tableId": 0,
                    "xCellSize": 4,
                    "yCellSize": 7,
                    "cellInfos": [
                        {
                            "tableCellId": 0,
                            "word": "案由",
                            "xsc": 2,
                            "xec": 2,
                            "ysc": 0,
                            "yec": 0,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 1,
                            "word": "机动车交通事故责任纠纷",
                            "xsc": 3,
                            "xec": 3,
                            "ysc": 0,
                            "yec": 0,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 2,
                            "word": "案件来源",
                            "xsc": 0,
                            "xec": 0,
                            "ysc": 0,
                            "yec": 0,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 3,
                            "word": "新收",
                            "xsc": 1,
                            "xec": 1,
                            "ysc": 0,
                            "yec": 0,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 4,
                            "word": "tsetset斯蒂芬森的发生的发生的方式打发似的发生的发",
                            "xsc": 1,
                            "xec": 3,
                            "ysc": 1,
                            "yec": 1,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 5,
                            "word": "当事人信息",
                            "xsc": 0,
                            "xec": 0,
                            "ysc": 1,
                            "yec": 1,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 6,
                            "word": "起诉状或申请书;随案卷宗;证据材料;",
                            "xsc": 1,
                            "xec": 3,
                            "ysc": 2,
                            "yec": 2,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 7,
                            "word": "移送材料",
                            "xsc": 0,
                            "xec": 0,
                            "ysc": 2,
                            "yec": 2,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 8,
                            "word": "陶芬",
                            "xsc": 3,
                            "xec": 3,
                            "ysc": 3,
                            "yec": 3,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 9,
                            "word": "辛庄法庭",
                            "xsc": 1,
                            "xec": 1,
                            "ysc": 3,
                            "yec": 3,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 10,
                            "word": "承办人",
                            "xsc": 2,
                            "xec": 2,
                            "ysc": 3,
                            "yec": 3,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 11,
                            "word": "移送审判庭",
                            "xsc": 0,
                            "xec": 0,
                            "ysc": 3,
                            "yec": 3,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 12,
                            "word": "备注",
                            "xsc": 0,
                            "xec": 0,
                            "ysc": 4,
                            "yec": 4,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 13,
                            "word": "",
                            "xsc": 1,
                            "xec": 3,
                            "ysc": 4,
                            "yec": 4,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 14,
                            "word": "2016-02-23",
                            "xsc": 3,
                            "xec": 3,
                            "ysc": 5,
                            "yec": 5,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 15,
                            "word": "移送时间",
                            "xsc": 2,
                            "xec": 2,
                            "ysc": 5,
                            "yec": 5,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 16,
                            "word": "移送人",
                            "xsc": 0,
                            "xec": 0,
                            "ysc": 5,
                            "yec": 5,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 17,
                            "word": "顾玉",
                            "xsc": 1,
                            "xec": 1,
                            "ysc": 5,
                            "yec": 5,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 18,
                            "word": "接收时间",
                            "xsc": 2,
                            "xec": 2,
                            "ysc": 6,
                            "yec": 6,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 19,
                            "word": "",
                            "xsc": 3,
                            "xec": 3,
                            "ysc": 6,
                            "yec": 6,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 20,
                            "word": "",
                            "xsc": 1,
                            "xec": 1,
                            "ysc": 6,
                            "yec": 6,
                            "pos": [ 
                            ]
                        },
                        {
                            "tableCellId": 21,
                            "word": "接收人",
                            "xsc": 0,
                            "xec": 0,
                            "ysc": 6,
                            "yec": 6,
                            "pos": [ 
                            ]
                        }
                    ]
                }
            ],
            "angle": 0
        }
    }
  2. 生成的对应的表格如下图:
  3. 上图中的右边的表格就是根据坐标json坐标值生成。具体代码包请到https://download.youkuaiyun.com/download/yinbaicheng/10574841下载
  4. 中间用到了jxl和poi还有json的转换。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ybcwjj

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值