• 周四. 10 月 3rd, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

java 读取excel 神器easyPoi

admin

11 月 28, 2021
	<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类:

发表回复