Ildelian
Ildelian

Reputation: 1318

Apache POI - Can't apply format to Cell

I'm trying to apply this cell format in ApachePOI:

XSSFCellStyle cellStyle  = myWorkBook.createCellStyle();        
    XSSFDataFormat format = myWorkBook.createDataFormat();
    cellStyle.setDataFormat(format.getFormat("h:mm:ss,000"));

But when I open Excel, gives this error: "Style from /xl/styles.xml part (styles) Undreadable Content"

Upvotes: 1

Views: 196

Answers (1)

Ildelian
Ildelian

Reputation: 1318

Problem solved using this format: ""[hh]:mm:ss.000""

Upvotes: 1

Related Questions