首页>代码>java读取WORD/EXCEL模板转换生成新WORD/EXCEL文档>/office/src/main/java/me/jtx/office/impl/WordOfficeDocumentImpl.java
package me.jtx.office.impl;

import java.util.Map;

import me.jtx.office.WordOfficeDocument;
import me.jtx.office.util.WordUtil;

/**
 * @author JSTHZX
 *
 */
public class WordOfficeDocumentImpl implements WordOfficeDocument {

	WordUtil wordUtil=new WordUtil(); 

	public boolean generateDocument(String templateFileName, String destFileName,
			Map<String, Object> map) {
		String filetype = templateFileName.substring(templateFileName.lastIndexOf(".") + 1);   
		if(filetype.equalsIgnoreCase("doc"))
			return wordUtil.generateBIFF8Document(templateFileName, destFileName, map);
		else if(filetype.equalsIgnoreCase("docx")){
			return wordUtil.generateOOXMLDocument(templateFileName, destFileName, map);
		}else{
			return false;
		}
	}

}
最近下载更多
yjdang  LV3 2023年3月27日
又双叒叕GUB了  LV1 2022年6月16日
liuzhi123  LV1 2022年3月29日
psccanda  LV7 2021年10月15日
william Lee  LV1 2021年9月7日
Hebin  LV1 2021年6月17日
suolonga  LV7 2021年4月14日
清风自来  LV3 2021年1月6日
航空科技  LV1 2020年12月25日
blackcat123  LV7 2020年12月7日
最近浏览更多
467277  LV13 4月18日
wsaffsa  LV2 2月19日
cbddbc  LV1 1月4日
panda1509 2023年4月14日
暂无贡献等级
yjdang  LV3 2023年3月27日
又双叒叕GUB了  LV1 2022年6月16日
xuweisong2010  LV27 2022年5月10日
fcdcdwc  LV15 2022年4月1日
liuzhi123  LV1 2022年3月29日
1850054442 2022年3月25日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友