Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

letui/UnityExcel

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

UnityExcel

操纵Excel的好工具,支持集合类型直接导出excel。

用例

List temp=new ArrayList();
temp.add(new DemoObject("宋丹丹",32,33.500,new Date()));
temp.add(new DemoObject("赵本山",36,23.5,new Date()));
Unity u=new Unity97();
try {
  u.exportUTable(temp, new FileOutputStream("src/temp.xls")).close();
} catch (IOException e) {
  e.printStackTrace();
}

POJO

class DemoObject {
	@UColumn(Head="姓名",Index=1)
	private String name;
	@UColumn(Head="年龄",Index=2)
	@UMapper(JsonMap="{'1':'一','2':'二'}")
	private int age;
	@UColumn(Head="腰围",Index=3,Suffix="寸",Prefix="SN-")
	@UFormatter(FormatPartten="##.##")
	private double width;
	@UColumn(Index=4)
	@UFormatter(FormatPartten="yyyy-MM-dd")
	@UStyleBinder()
	private Date birthday;
 }
看懂或者看不懂,代码就在这里,谢谢。

About

易用易扩展的Excel导出导入工具包

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.