java 读取excel 神器easyPoi

	<dependency>
	        <groupId>cn.afterturn</groupId>
		<artifactId>easypoi-annotation</artifactId>
		<version>${easypoi.version}</version>
		<scope>provided</scope>
	</dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>
        ImportParams params = new ImportParams();
        params.setTitleRows(0);
        List<TDAddress> result = null;
        try {
            result = ExcelImportUtil.importExcel(new ByteArrayInputStream(importAddressReq.getData()), TDAddress.class, params);
        } catch (Exception e) {
            throw new BizServiceException(e.getMessage());
        }

importAddressReq类

TDAddress类:

posted @ 2021-08-13 10:46  别问1991  阅读(578)  评论(0编辑  收藏  举报