当前位置:网站首页>Using POI TL to insert multiple pictures and the same data of multiple rows of cells into the table cells of word template at one time, it is a functional component for automatic merging
Using POI TL to insert multiple pictures and the same data of multiple rows of cells into the table cells of word template at one time, it is a functional component for automatic merging
2022-07-29 05:32:00 【crystal lattices 】
One 、 How to insert multiple pictures
1) Use blocks provided in the document to insert multiple pictures
Use of blocks : stay word Use in templates :
{ {?images}}
{ {url}}
{ {/images}}
After defining the template in this way , The structure of the data model is as follows :
data.put("items", new ArrayList<JSONObject>(){
{
add(new JSONObject().fluentPut("url", " Picture links 1"));
add(new JSONObject().fluentPut("url", " Picture links 2"));
add(new JSONObject().fluentPut("url", " Picture links 3"));
}});The above picture links can also be through Pictures.ofUrl().create() structure PictureRenderData Use .
2) Customize the plug-in to insert multiple pictures
When inserting multiple pictures according to the method , You must use a list of objects , That is to say, it must be in items List add contains url Object of property ; We want to make it easier to insert multiple graphs , Use '&' Character as the prefix of the custom plug-in .
The plug-in code for inserting multiple pictures is as follows :
package com.fight.strive.sys.modules.poi_tl;
import com.deepoove.poi.data.PictureRenderData;
import com.deepoove.poi.policy.AbstractRenderPolicy;
imp边栏推荐
- 365 day challenge leetcode 1000 questions - day 039 full binary tree inserter + find peak II + snapshot array
- 来!看排名一年上升16位的ClickHouse,如何在京东落地实践
- Day 3
- Live broadcast preview | how to save 30% labor cost and shorten 80% trademark processing cycle?
- Storage category
- 终端shell常用命令
- 【C语言系列】— 打印100~200之间的素数
- EXIT中断详解
- JD cloud and Forrester consulting released a hybrid cloud report that cloud Nativity has become a new engine driving industrial development
- 数据泄漏、删除事件频发,企业应如何构建安全防线?
猜你喜欢

Together with digital people, digital space and XR platform, Alibaba cloud and its partners jointly build a "new vision"

千人规模互联网公司研发效能成功之路

阿里云架构师细说游戏行业九大趋势

365天挑战LeetCode1000题——Day 036 二叉树剪枝 + 子数组和排序后的区间和 + 删除最短的子数组使剩余数组有序

Occt learning 002 - environment construction

全局components组件注册

【C语言系列】— 一道递归小题目

预约中,2022京东云产业融合新品发布会线上开启

京东云联合Forrester咨询发布混合云报告 云原生成为驱动产业发展新引擎

Helm chart for Kubernetes
随机推荐
【C语言系列】—三种方法模拟实现strlen库函数的方法
适创科技以云仿真平台,支持“中国智造”升级
Cryengine5 shader debugging
D3d Shader Instruction
力扣994:腐烂的橘子(BFS)
Vs code的安装步骤及环境配置
GPIO的输入输出详解
数据库操作 Day 6
167. 两数之和 II - 输入有序数组
C语言 一维数组
抢先预约 | 阿里云无影云应用线上发布会预约开启
C语言数组典型应用代码详细讲解—高手误入(逐步代码详解)
365 day challenge leetcode 1000 questions - day 039 full binary tree inserter + find peak II + snapshot array
冒泡排序 C语言
Basic principle of recursion
365 day challenge leetcode 1000 questions - day 041 two point search completion anniversary + nth magic number + online election
【赛事预告】云上开发,高效智能——第二届阿里云ECS CloudBuild开发者大赛即将启动
Allocate memory: malloc() and free()
第一周总结
365 day challenge leetcode 1000 questions - day 037 elements and the maximum side length of squares less than or equal to the threshold + the number of subsequences that meet the conditions