aspose-words-18.10-jdk16-crack破解可用


aspose-words-18.10-jdk16-crack比较新,建议用jdk1.8,我本人用的是jdk1.8的,测试效果是可以的,去水印和去Evaluation Only. Created with Aspose.Words. Copyright 2003-2018Aspose Pty Ltd.这个是可以去掉的。请勿用于商业用途,本人只做技术分享,发生纠纷概不负责。里面有我自己写的测试类、jar包、word模板和图片,大家可以自行下载后测试使用。如有什么可以改进的,请告知。
资源截图
代码片段和文件信息
package com.thinkgem.jeesite.common.persistence;

import com.aspose.words.IMailMergeDataSource;
import com.aspose.words.ref.Ref;


import java.util.ArrayList;
import java.util.List;
import java.util.Map;


public class MapMailMergeDataSource implements IMailMergeDataSource {
    private Listject>> dataList;
    private int index;

    //word模板中的«TableStart:tableName»«TableEnd:tableName»对应
    private String tableName = null;

    /**
     * @param dataList  数据集
     * @param tableName 与模板中的Name对应
     */
    public MapMailMergeDataSource(Listject>> dataList String tableName) {
        this.dataList = dataList;
        this.tableName = tableName;
        index = -1;
    }

    /**
     * @param data      单个数据集
     * @param tableName 与模板中的Name对应
     */
    public MapMailMergeDataSource(Mapject> data String tableName) {
        if (this.dataList == null) {
            this.dataList = new ArrayListject>>();
            this.dataList.add(data);
        }
        this.tableName = tableName;
        index = -1;
    }

    /**
     * 获取结果集总数
     *
     * @return
     */
    private int getCount() {
        return this.dataList.size();
    }

    @Override
    public IMailMergeDataSource getChildDataSource(String arg0)
            throws Exception {
        return null;
    }

    @Override
    public String getTableName() throws Exception {
        return this.tableName;
    }

    /**
     * 实现接口
     * 判断是否还有下一条记录
     */
    @Override
    public boolean moveNext() throws Exception {
        index += 1;
        if (index >= this.getCount()) {
            return false;
        }
        return true;
    }

    /**
     * 实现接口
     * 获取当前index指向数据行的数据
     * 将数据存入args数组中即可
     *
     * @return ***返回false则不绑定数据***
     */
    @Override
    public boolean getValue(String key Refject> args) throws Exception {
        if (index < 0 || index >= this.getCount()) {
            return false;
        }
        if (args != null) {
            args.set(this.dataList.get(index).get(key));
            return true;
        } else {
            return false;
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件       47270  2018-12-21 23:19  Template1.docx
     文件       35958  2018-12-21 23:17  employees.jpg
     文件       17654  2018-12-20 11:35  Template.docx
     文件        2324  2018-12-21 23:16  WordExportUtilTest.java
     文件    12752053  2018-10-17 09:44  aspose-words-18.10-jdk16-crack.jar
     文件         586  2018-08-15 16:12  license.xml
     文件        2422  2018-12-20 10:48  MapMailMergeDataSource.java

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)