angularJS+ssm+dubbo下利用easypoi导出下载Excel

在父工程的pom文件下导入包

   <!--导出excel -->
        <dependency>
            <groupId>cn.afterturn</groupId>
            <artifactId>easypoi-annotation</artifactId>
            <version>3.0.3</version>
        </dependency>
        <dependency>
            <groupId>cn.afterturn</groupId>
            <artifactId>easypoi-web</artifactId>
            <version>3.0.3</version>
        </dependency>
        <dependency>
            <groupId>cn.afterturn</groupId>
            <artifactId>easypoi-base</artifactId>
            <version>3.0.3</version>
        </dependency>

 然后在pojo下,另加一个包,在里面写用来接收要在Excel表格中显示的那些字段

在TabOrderExcel.java中。要加上注解,也要实现set、get方法,实现序列化接口

 在前端,点击"导出”,就会去访问我的产生Excel接口。

  <button type="button" class="btn btn-default" title="导出" ng-click="findAll()"><i class="fa fa-refresh"></i> 导出</button>

扫描二维码关注公众号,回复: 3691042 查看本文章

去 访问接口

 

猜你喜欢

转载自blog.csdn.net/loveliness_peri/article/details/83064465