• 周五. 12月 9th, 2022

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类:

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注