Excel data Import ___ Do you hold it? (b)

Source: Internet
Author: User

in the previous blog post, I described the approximate flow of Excel data import and a demo instance Excel Data import ___ Do you hold It (i)

In this article we will take you through the process of importing Excel and the problem solving solution:

Import Excel processes and steps

It is important to note that these lines of code are added to the Server -side Web Config

<!--import Excel Nancy -2015-7-8  ---<appsettings><addkey= "Dbcontextfactoryclassfullename" value= "ITOO. FreshStMaintain.DAL.DbContextFactory "/><add key=" Excelimportxmlpath "value=" Common/importflow "/><add key= "Freshentities" value= "Data source=192.168.24.233;initial catalog=fresh;persist security Info=true;user Id=sa; password=123456; "/>  </appSettings>

Ps:<add key= "Excelimportxmlpath" value= "Common/importflow"/> value= "" is based on the naming of the folders in your project, which you can refer to below:

importing Excel issues and Solutions

Because of the inconsistent file name of the configuration file in <add key= "Excelimportxmlpath" value= "Common/importflow"/>server. The XML file for Excel is not found. so the file name must be consistent.



The process of debugging often prompts for this error, which does not affect the last run. Do not affect your own development of the mood.



The error should be carefully analyzed at this time, if the configuration file does not have the word default, it can be wrong from the code, "TimeStamp" or the default value of the English field is consistent with the database



You can now find your own Excel data is empty, or if there is a null value in the property field in the database

When you find that the problem appears in the "Do not see object reference set to object instance", it means that you are not far from success. Not afraid of the wrong code, it is afraid of the program without bugs.

I hope you have always supported my blog and learn to share together.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Excel data Import ___ Do you hold it? (b)

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.