package com.yx.face.boot.uitls;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

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

/**
 * @description: ExcelListener excel导入 <br>
 * @date: 2021/9/26 17:17 <br>
 * @author: WXG <br>
 */
public class ExcelListenerUtils extends AnalysisEventListener {
    private List<Object> list = new ArrayList<>();
    @Override
    public void invoke(Object data, AnalysisContext context) {
        list.add(data);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {

    }
    public List<Object> getDatas() { //把存储的数据通过此方法暴露出去
        return list;
    }
}
