The SQL imported Excel method that is outdated on the Internet, and an error is reported after trying for half a day...

Source: Internet
Author: User

Finally, the project uses SQL to import Excel Data. To process excel, you have to use SQL statements to import and release the data to the production environment ....

 

Most of

The SQL query analyzer returns an error.

 

Good guy, there are a lot of web pages on the Internet that can help solve the problem, but I tried well. They all don't change the changes. It's all a saying, that is, none of them actually passed the test.

No way, you have to do it yourself .. Finally find out the reason

 

 1   --  Excel export reports that the ole db access interface "Microsoft. Jet. oledb.4.0" cannot be initialized to the linked server "(null"  
2 -- Error: you only need to increase extended properties = Excel 8.0
3 Select * From OpenDataSource ( ' Microsoft. Jet. oledb.4.0 ' , ' Data Source = "D:/vv.xls"; user id = admin; Password =; extended properties = Excel 8.0 ' )... [ VV $ ]
4 Select * From OpenRowSet ( ' Microsoft. Jet. oledb.4.0 ' , ' Excel 8.0; HDR = yes; database = D:/vv.xls ' , VV $)

Hope to help you .... The cause of the error is Microsoft. jet. oledb.4.0 Excel = 8.0 here Excel = 8.0, problem, the driver "ole db access interface" Microsoft. jet. oledb.4.0 ""

 

See... The preceding two functions are used: OpenDataSource and OpenRowset.

Let's try again.

 1  --  Other formats for importing CVS  
2 -- The system reports that the column information cannot be obtained from the ole db access interface msdasql of the linked server (null ).
3 Select * From
4 OpenRowSet ( ' Msdasql ' ,' Driver = {Microsoft text Driver (*. txt; *. CSV)}; defaultdir = D:; extensions = CSV; ' , ' Select * from example vv.csv] ' )

 

Save the Excel file to be imported as CSV... Import using the above method... This error is reported if no conversion is performed.

 

Sorry ........ .. I have not found a solution yet. I hope the cool man can find the solution .. Let me know... Learning Together, making progress together ..........

 

 

Related Article

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.