Java-excel Import and export, report invalid data

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.