When parsing excel, a certain cell is stored as "8:00", but the parsed value is "31-December-1899". . . .
Black question mark face? ? ?
How is this going? No error was reported. The project requirement is that I can parse it out as a string according to what the customer writes. Everyone's explanations on the Internet are all parsed according to a fixed format. My requirement is that I can take out what the customer writes. How should I do it?
I looked at the excel format and the format is time. It will be fine after setting it to text. However, according to the customer's condition that he does not know, does not know, and will not change it, I would like to ask if I can solve this problem through code. Is there a problem?
The time in excel is actually a string of numbers stored. The value of the cell you see is the result after formatting. When poi reads the cell, no matter what format the user uses in excel to display the value, as long as it is in date format You can tell it by writing it like this using poi
If it is in text format, just read it directly into text