Bug 66229 - i need date,but i wirte too long integer insert sucessed
Summary: i need date,but i wirte too long integer insert sucessed
Status: NEEDINFO
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 5.2.2-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-18 02:47 UTC by puguoan
Modified: 2022-08-19 01:19 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description puguoan 2022-08-18 02:47:59 UTC
Component:HSSF\XSSF
import xls or xlsx
i want "2022\02\02" import to db.

normal:2022\02\02 insert sucessed. 
but insert "1111111111111111111111111111" sucessful too.that convert date sucessful.

i want date as String,but
i get datestyle is 'yyyy\M\d'
use dataformatter to be 'M\d'.

i want read data cell as String,as same as my written things .

i want: '2022\01\01' i read is '2022\01\01'(String)
now: '2022\01\01' read is 'xx\xx'(dataformater)
now '1111111111111' read is 'xx\xx'(dataformater)
now '2022\01\01' (getCellDate) successful
but not '11111111111' getCellDate sucessful too...
Comment 1 PJ Fanning 2022-08-18 11:20:06 UTC
Hi Puguoan,

I'm afraid this is not a good way to get coding advice. There is possibly a language barrier but I don't really understand what you are looking for. By far the best way to get through language barriers is for you to provide a reproducible code example - so that other users can try to work with the issue you are seeing.

This web site is really for reporting bugs. I really think that https://stackoverflow.com/ is a much better place to start. Be aware that Stackoverflow requires some effort on your part and users there are not happy to get vague questions.

https://stackoverflow.com/help/how-to-ask - I think this article is a good read for anyone who is asking questions or raising issues.
Comment 2 puguoan 2022-08-19 01:19:19 UTC
getCellDate():
xls/xlsx file cell value = "1111111111111111"
i read file,use getCellDate() get value.that is date type.

---
DataFormatter:
cell = "2022/02/02" or "11111111111"
i try use DataFormatter.formatCellValue(cell),that print 'MM/yy'.
i want only get yyyy/MM/dd date or String class value.

thanks

stackoverflow seach all no methed.