Warning: Maximum number of format records exceeded. Using default format.

http://blog.csdn.net/dracotianlong/article/details/8928434



Warning:  Maximum number of format records exceeded.  Using default format.  
Warning:  Maximum number of format records exceeded.  Using default format.  
Warning:  Maximum number of format records exceeded.  Using default format.  
Warning:  Maximum number of format records exceeded.  Using default format.  
Warning:  Maximum number of format records exceeded.  Using default format

java.util.Date day = (Date) labelValueObj;  
jxl.write.DateFormat df = new jxl.write.DateFormat("yyyy-MM-dd");  
jxl.write.DateTime dateCell = new jxl.write.DateTime(cell.getColumn(), cell.getRow() + j,  
        day, new WritableCellFormat(df));  
wSheet.addCell(dateCell);  

But出现了Warning:  Maximum number of format records exceeded.  Using default format.警告,并且大部分的时候时间类型的数据都不正确,变成数字

google一下,google是一个好东西,顺便骂下dangzy,为嘛墙了google在中国使用【去年我买了一个表】



说是源码设置 new WritableCellFormat 最多100个,过多就会出现Waring错误,


jxl.biff.FormattingRecords  
  
private static final int maxFormatRecordsIndex = 0x1b9;

需要修改成


private static final int maxFormatRecordsIndex = Integer.MAX_VALUE; 

编译好的jar包见附件。

你可能感兴趣的:(java)