poi 单元格格式

cell.getCellStyle().setDataFormat((short) 0x26);

  

 


 The following is a list of built-in formats provided is POI 3.0:

S/No.

Format 

VlaueS/No

Format

Value 
1General012h:mm AM/PM0x12
20113h:mm:ss AM/PM0x13
30.00214h:mm0x14
4#,##0315h:mm:ss0x15
5#,##0.00416m/d/yy h:mm0x16
6($#,##0_);($#,##0)517(#,##0_);[Red](#,##0)0x26
7($#,##0_);[Red]($#,##0)618(#,##0.00_);(#,##0.00)0x27
8($#,##0.00);($#,##0.00)719(#,##0.00_);[Red](#,##0.00)0x28
9($#,##0.00_);[Red]($#,##0.00)820_(*#,##0_);_(*(#,##0);_(* \"-\"_);_(@_)0x29
100%921_($*#,##0_);_($*(#,##0);_($* \"-\"_);_(@_)0x2a
110.00%0xa22_(*#,##0.00_);_(*(#,##0.00);_(*\"-\"??_);_(@_)0x2b
120.00E+000xb23_($*#,##0.00_);_($*(#,##0.00);_($*\"-\"??_);_(@_)0x2c
13# ?/?0xc24mm:ss0x2d
14# ??/??0xd25[h]:mm:ss0x2e
15m/d/yy0xe26mm:ss.00x2f
16d-mmm-yy0xf27##0.0E+00x30
17d-mmm0x1028@-This is text format.0x31
18mmm-yy0x1129text-Alias for "@"0x31

Note:-The values from 0x17 to 0x24 are reserved for international and undocumented and 0x25 is for "(#,##0_);(#,##0)".

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值