package com.tiesheng.poi.read;

import cn.hutool.core.util.ClassUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.read.listener.ReadListener;

import java.io.File;

public class PoiReadBase {


    /**
     * 读取文件
     *
     * @param file
     * @param readListener
     * @return
     */
    public static <T> String read(File file, ReadListener<T> readListener) {
        Class<?> aClass = ClassUtil.getTypeArgument(readListener.getClass(), 0);
        EasyExcel.read(file, aClass, readListener).autoTrim(true).headRowNumber(1).sheet().doRead();
        return null;
    }

}
