简体   繁体   English

使用Spring MVC创建CSV文件

[英]create csv file using Spring MVC

I Need to create a CSV file using JAVA. 我需要使用JAVA创建CSV文件。

Earlier I created excel file using HSSFBook from Apache POI, and from SPRING support I used AbstarctExcelView.buildExcelDocument() . 早些时候,我从Apache POI使用HSSFBook创建了excel文件,并且从SPRING支持中,我使用了AbstarctExcelView.buildExcelDocument()

Similarly, want to ask is there any predefined class like HSSFBook from Apache POI (or from any vendor) to create a csv file . 同样,要问是否有来自Apache POI(或来自任何供应商)的诸如HSSFBook类的预定义类来创建csv文件 And their spring supports like AbstarctExcelView class . 并且它们的弹簧支持像AbstarctExcelView class

Try Super CSV ,this has POJO support. 尝试Super CSV,它具有POJO支持。 You can easily create the csv using your pojos. 您可以使用pojos轻松创建csv。 I prefer this than Apache POI. 我比Apache POI更喜欢它。 https://super-csv.github.io/super-csv/examples_writing.html https://super-csv.github.io/super-csv/examples_writing.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM