Ado.net access excel, ado. netexcel

Source: Internet
Author: User

Ado.net access excel, ado. netexcel

Class 1: OleDbConnection...

2 connection string:

Provider = Microsoft. ACE. OLEDB.12.0; Data source1_excelpath.xlsx}; Extended Properties = "Excel 12.0 Xml; HDR = NO; IMEX = 1 ;"

Note: 1). The connection string can access excel2013

2). If the first line is the header, HDR = YES. If the first line is not the header and the data is directly the data, HDR = NO.

3). The engine uses the scan method to confirm the Data Type of each column. IMEX should indicate the maximum number of rows scanned each time, ranging from 1 to 16. The default value is 8.

3. Table Name in excel:

1). [sheetName $]

2). [sheetName $ + region name], for example, [sheetName $ A1: B3]

Select * from [Sheet1 $ A1: B3]

Select * from [Sheet1 $]

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.