The template format is wrong
I can also use this Share things with everyone so that everyone can use them out of the box.I plan to split this article into two parts. The first part talks about some verification logic and supplementary knowledge of Excel import. The next part will talk about how to design the Excel import template and how to create some good interactive experiences.1. Several steps of importGenerally speaking, the Excel import processing logic of B-end products can be broken down into the following steps:Upload Excel template and parse the template file;Verify the fields in the template file to confirm that the data is legal and compliant.Execute business logic and a series of logical processing;Insert into the database table and the import is completed;2. Several core points when importingSince there are 4 core steps, it also means that errors may Iceland Phone Numberoccur in these 4 steps. We can sort out these 4 steps separately, confirm some common abnormal scenarios, and then provide corresponding solutions.1. Upload and parse the templateThe format of the template file is incorrect.
https://lh7-us.googleusercontent.com/R9utN0C9ulTN34RoVQHOV5FElhfwlgdDOfloyaNTfqRQEnjWa4La1iA3sptiKiBmIACz0v61xxlQEMPEUOLWaKd8W1mnYG-IuhyOSDnivfg0s27CDtrPr_upB0IfJC7-ZcF6obMvt2TLQLsRW1SQraU
For example, it only supports .xlsx, but if you upload .pdf, an error will be reported;The template file is too large. For example, it only supports uploading files within 5MB, but if you upload a 10MB file, an error will be reported;The template cannot be parsed because some Excel files are encrypted, blank or damaged and cannot be opened, resulting in file parsing failure;The amount of template data is too large. For example, it only supports importing 5,000 rows of data at a time. If it exceeds, an error will be reported or only the first 5,000 rows will be fetched.
頁:
[1]