java基于xml配置的通用excel单表数据导入组件(五、Action处理类)

package xxxxxx.manage.importexcel;

import java.io.File;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;

import net.sf.json.JSONObject;

import xxxxxx.supp.ACT_Common;

/**
 * <p>
 * Title:excel数据导入
 * </p>
 * <p>
 * Description:excel数据导入
 * </p>
 * <p>
 * Copyright: Copyright (c) 2013
 * </p>
 * <p>
 * Company:
 * </p>
 * 
 * @author lxj
 * @version 1.0
 */

public class ACT_ImportExcel extends ACT_Common {

    private static final Logger logger = Logger.getLogger(ACT_ImportExcel.class
            .getName());

    // 返回结果给客户端
    private JSONObject jsonResult;
    private File excel;
    private String excelContentType;
    private String excelFileName;
    private String tableTarget;

    /**
     * excel数据导入至"_import"临时表
     * 
     * @return
     */
    public String doImport() {
        DAO_ImportExcel importExcel = new DAO_ImportExcel(tableTarget, excel);
        jsonResult = JSONObject.fromObject(importExcel.doImport());
        return "doFormJSON";
    }

    public JSONObject getJsonResult() {
        return jsonResult;
    }

    public void setJsonResult(JSONObject jsonResult) {
        this.jsonResult = jsonResult;
    }

    public File getExcel() {
        return excel;
    }

    public void setExcel(File excel) {
        this.excel = excel;
    }

    public String getTableTarget() {
        return tableTarget;
    }

    public void setTableTarget(String tableTarget) {
        this.tableTarget = tableTarget;
    }

    public String getExcelContentType() {
        return excelContentType;
    }

    public void setExcelContentType(String excelContentType) {
        this.excelContentType = excelContentType;
    }

    public String getExcelFileName() {
        return excelFileName;
    }

    public void setExcelFileName(String excelFileName) {
        this.excelFileName = excelFileName;
    }

}

 

转载于:https://www.cnblogs.com/101key/p/3286533.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值