You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
420 B
19 lines
420 B
package com.youlai.boot.common.util;
|
|
|
|
import cn.idev.excel.EasyExcel;
|
|
import cn.idev.excel.event.AnalysisEventListener;
|
|
|
|
import java.io.InputStream;
|
|
|
|
/**
|
|
* Excel 工具类
|
|
*
|
|
* @author haoxr
|
|
* @since 2023/03/01
|
|
*/
|
|
public class ExcelUtils {
|
|
|
|
public static <T> void importExcel(InputStream is, Class clazz, AnalysisEventListener<T> listener) {
|
|
EasyExcel.read(is, clazz, listener).sheet().doRead();
|
|
}
|
|
}
|
|
|