ASP connection and operation of Excel method

Source: Internet
Author: User
Tags odbc ole access

Excel files can also be used as a database, although the premise is that its content to meet certain specifications, the simple way is to export from the database file as an Excel file.

1. Number of connection characters

There are two ways that ODBC provider and OLE DB provider

(1) ODBC

Dim conn

Set Conn=server.createobject ("Adodb.connection")

Conn.Open "Driver={microsoft Excel Driver (*.xls)};D bq=" & Server.MapPath ("Xx.xls") & "; Readonly=false; Provider = MSDASQL "

(2) OLE DB

Dim conn

Set Conn=server.createobject ("Adodb.connection")

Conn.Open "Data source=" & Server. MapPath ("Db/lqcx2010.xls") & "; Extended properties=excel 8.0;provider=microsoft.jet.oledb.4.0 "

2, access to the data table

Grammar:

strquery = "SELECT * FROM [sheet1$]"

Or

strquery = "SELECT * from" Sheet1ASP connection and operation of Excel Method-Webmaster College the future Chinese webmaster, more focused on the development of China's network AD Service latest updates add Favorites set as homepage

    • Home
    • Internet Software
    • IDC Products
    • Webmaster Trading
    • Project Outsourcing
    • Business Information
    • Recruitment job
    • Company Library
    • Information
    • Download
    • College
    • Tools
    • Forum
Hot Keywords:CSS layout color reference Dreamweaver8 APACHEAPACHEIIS6AJAXWML Home Webmaster Home Webmaster Introduction Operation planning Search optimization website profit web design Html css/xhtml Dhtml WAP Dreamweaver design principle plane animation Photoshop Firework Flash website Development Asp. Net Php Jsp Mssql Access Oracle Mysql server Fressbsd LINUX Windows
Video Tutorials Common Manuals Common Advertising Code JS Special effects Code
Webmaster College >> Website Development Technology Tutorials >> ASP Tutorials >> ASP connection and operation Excel method

ASP connection and operation of Excel method

2010-11-21 11:23:00 View Learning experience "

Where Sheet1 is the name of the worksheet for the Excel file, and in the exported Excel file, a table is exported to a sheet (sheet)



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.