本帖最后由 Joestar.Xu 于 2024-5-28 10:01 编辑
产品:GcExcel
问题编号:DOCXLS-8709
LastReview:2024-5-28
最新进展:计划V7.1修复
模板和数据见附件。代码如下,结果渲染的时候,C列底色没有跟着扩展
- public class DemoJsonDatasource {
- public static void main(String[] args) throws IOException {
- Workbook workbook = new Workbook();
- String templateFile = "21.template.xlsx";
- workbook.open(templateFile);
- String dataFile0 = "21.ds0.json.txt";
- JsonDataSource datasource0 = new JsonDataSource(new String(Files.readAllBytes(Paths.get(dataFile0)),StandardCharsets.UTF_8));
- workbook.addDataSource("ds0", datasource0);
- workbook.processTemplate();
- workbook.save("21.result.xlsx");
- }
- }
复制代码
|
|