Bug 60518 - HSSFCell.Type can not recognize the right type
Summary: HSSFCell.Type can not recognize the right type
Status: RESOLVED WORKSFORME
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.15-FINAL
Hardware: Macintosh All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-26 09:16 UTC by Mike Json
Modified: 2017-02-17 04:11 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Json 2016-12-26 09:16:21 UTC
type set in word is date type,but in program it became number sometimes or text,really confusing
Comment 1 Javen O'Neal 2016-12-26 18:41:31 UTC
Can you please post an short example of the code that is causing you problems?

Your code should look like this: https://poi.apache.org/spreadsheet/quick-guide.html#CreateDateCells

Note that you CANNOT set a date cell like this:

> cell.setCellValue("12/26/2016");
> cell.setCellType(CellType.DATE);
Comment 2 Javen O'Neal 2017-02-17 04:11:25 UTC
Closing since no response for several months. Please reopen with necessary information to reproduce the problem if you are still experiencing an issue.