With Java, do a set of background account management system, with Excel import and Export module
After the background administrator is logged in, you can read the Excel workbook in the specified format by <input type= "file";
The system parses the read to Excel, gets the worksheet data in the workbook,
Of course, if
Upload file, not an Excel file, will show upload failed
Or
is an Excel file, but the data in the worksheet does not meet the requirements, it will automatically filter out the data rows that do not meet the requirements
Here's the problem:
Remember before the test, is no problem, but today, the export file, import again, has been reported invalid data
(not to mention the mood is more sad, if the import and export module if there is a problem, this is not a human life? )
Later, a step test found that the system to determine the time field data is invalid data, resulting in invalid data import failed!
When we got here, it dawned on me:
Originally:
Importing Excel, after the system, all the time cell data is 0, and the system will automatically filter out the time is not greater than 0 of the data, so reported invalid data, import failed
Because:
In the background database, when I do the test data, the diagram is convenient, directly to the Library table Time field (long type), all use the default value->0
When exporting and re-importing, reading the exported Excel time cell data to the system, all time cell data is 0,
When importing, the system automatically filters out data with a time of no more than 0
We're going to fix it here.
Of course, through the system to import, it will not occur when the time is 0, who idle nothing to engage in a 1970 data import?
First day of opening, 2015-03-21 Day
The night is drunk, try to move forward
Java-excel Import and export, report invalid data