ExcelADO ???? ????? ??????? ADO ?????? ?????? ???????? ?? ?????? Excel

?????? ????????? ?????? ?????????
???? ???????: 278973 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

??????

???? ????? ExcelADO.exe ??? ????? ??????? ?????? ?????? ActiveX (ADO) ?? Microsoft ???? Jet OLE DB 4.0 ?????? ?????? ???????? ?? ?????? Microsoft Excel.

??????? ????

????? ????? ?????? ??????? ?? "???? ??????? ?? Microsoft":
ExcelADO.exe
????? ???????:, 12 ?????? 2000

?????? ??? ??????? ?????? ??? ????? ????? ????? ??? Microsoft "? ???? ??? ??? ??????? ?????? ?????? ??" ????? ??????? ?? Microsoft:
119591????? ?????? ??? ????? ??? Microsoft ?? ??????? ??? ????????
???? Microsoft ???? ??? ????? ????? ?? ?????????. ??????? Microsoft ???? ?? ?????? ??? ??????? ??????? ??? ??????? ???? ?? ??? ?????. ??? ????? ????? ??? ?????? ????? ?????? ???? ????? ??? ??? ????? ??? ??????? ??? ???? ??? ??? ?????.

????? ??????? ADO ?

???? ??????? ADO ??? ??? ???????? ??? ?? ??????? ???????? ?? ???? Excel ???? ?? ?????? ?? ?????? ?? ??????? ??? ??????? ??? Excel:
  • ??????. ???? Microsoft Excel ???? ActiveX ???? ?????. ADO ??? ??????? ?? ????? ???? ????? ????????? ???? ????? ???????.
  • ?????? ??????. ??????? ??? ??? ????? ???????? ???? Microsoft Excel. ???? ADO ?? scaleable ???? ??????? ???????? ?? ????.
???? ??????? ADO ????? ???? ?????? ????? ??? ????. ?? ????? ??????? ADO ?????? ??????? ?? ??? ???????. ??? ???? ????? ??? ???????? ??? ???? ??? pre-formatted ???? ???????? ??? ???????. ??? ???? ??????? "??????" ??? ????? ????????, ????? ????? ??? ??????? ?? ??????? ?? ?? ????? ?? ??????.

??????? ???? OLE DB ?? Jet ?? ?????? Excel

???? ??????? ???? ????? ?????? Microsoft Jet ?????? ??? ???????? ?? ????? ?????? ????? ???????? ????? ??? ?????? Excel ?? ???? ????? ??????? ??????? ???????? Access ??????? (ISAM) ???????. ???? ??????? ?????? ???????? ?? ??? Microsoft Jet 4.0 ???? OLE DB ????? ??? ????? ???????? ?? ??????? ??????? ???????. ????? ???? Jet OLE DB ??????? ??????? ?? ????? ???????? ?????? Microsoft Excel:
  • 3.0 Excel
  • Excel 4.0
  • Excel 5.0
  • 8.0 Excel
??????: ??????? ??? ????? ?????? ???? Excel 5.0 ?????? Microsoft Excel 5.0 ? 7.0 (95) ??????? ??? ????? ?????? ???? Excel 8.0 Microsoft Excel 8.0 (97) ? 9.0 ???????? (2000). ?????? ????? ExcelADO.exe ?????? Excel ?????? Excel 97 ? Excel 2000.

????? ??????? ??? ???? ????? Excel 97 (?? 2000) ADO:
Dim oConn As New ADODB.Connection
With oConn
    .Provider = "Microsoft.Jet.OLEDB.4.0"
    .Properties("Extended Properties").Value = "Excel 8.0"
    .Open "C:\Book1.xls"
    '....
    .Close
End With
				
- ?? -
Dim oConn As New ADODB.Connection
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
           "Data Source=C:\Book1.xls;" & _
           "Extended Properties=""Excel 8.0;"""
oConn.Close
				
???????? ????? ???????

???? ??? ??? ????? ?????? ??? ?????? (?? ????) ?? ???? Excel:
  • ??????? ??? ?????? ??????? ?????? ??????? (??? ???? ??????? [Sheet1 $] ?? [My Worksheet $]). ????? ???? ???? ???? ??? ??????? ???? ???? ??????? ?? ???? ???? ????? ????????? ??????.
    oRS.Open "Select * from [Sheet1$]", oConn, adOpenStatic
    					
  • ??????? ???? ???? ???? (??? ???? ??????? [????1]).
    oRS.Open "Select * from Table1", oConn, adOpenStatic
    					
  • ??????? ???? ?????? ???? (??? ???? ??????? [Sheet1 $ A1: B10]).
    oRS.Open "Select * from [Sheet1$A1:B10]", oConn, adOpenStatic
    					
???? ????

?? ?????? Excel ???? ????? ?? ???? ????? ?? ????? (?? ????? ??????) ?????????. ??? ??? ?????? ????? ?? ????? ??? ???? ? ????? ????? HDR = NO ?? ??????? ??????? ?? ????? ???????. ??? ??? ???? ????? ?? ????? ??? ???? ???? OLE DB ???????? ?????? ?????? ?? (??? ?? ???? F1 ????? ????? ?? F2 ?? ???? ????? ?????? ?????).

????? ????????

???? ????? ?????? ?????? ???? ????? ???????? ?????? ????? ?????? ??????? ?? ????? Excel. ????? ?? ???? ???? ???? OLE DB ??? ????? ?? ?????? ?? ???? "?????" ??? ?????? ?????. ??? ?????? ?????? ?????? ??????????? ??? ????? (8) ????; ????? ????? ??? ?????? ?????? ?????? ?? ???? ????? ???? ??? ???? (1) ? ??? (16) ??????? MAXSCANROWS ?? ??????? ??????? ?? ????? ???????.

????? ????? ?? ??? ?????

????? ????? ExcelADO.exe ??? ????? Visual Basic EXE ????? ????? ?????? ?????? (ASP) ? Excel 97 ? Excel 2000 ???????? ???? ???? ????? ?????? ????? ?????? Microsoft Access 2000. ??????? ???????? ???????:

????? ????? Visual Basic ????? EXE
  • ExcelADO.vbp
  • Form1.frm
  • Form1.frx
????? ?????? ??????
  • EmpData.asp
  • Orders.asp
?????? Microsoft Excel
  • OrdersTemplate.xls
  • EmpDataTemplate.xls
  • ProductsTemplate.xls
  • SourceData.xls
????? ?????? Microsoft Access
  • Data.mdb

????? ??????? ?? ?????

??????? ??????? ????? .exe ??? ????.

???????? ????? Visual Basic:
  1. ?? Visual Basic? ??? ??? ExcelADO.vbp.
  2. ?? ??????? ??????? ??? ????? ?? ?? ?????? ??????? ??? Microsoft ADO Ext. ?? DDL ??????? "?" ????? ?????? ?????? ActiveX Microsoft. ???? ??? ????? ??? ?? ?? ?? ADO 2.5 ? ADO 2.6 ? ???? ??? ??????? ??????? ??? ???? ????????? ????? ??.
  3. ???? ??????? F5 ?????? ????????. ???? ????? ????? ????????.
  4. ???? ??? ????? 1. ??? ??????? ?? ????? ???? OrdersTemplate.xls. ???? ?????? ADO ??????? ?????? ???? ??? ?????? ??????? ?? ???? ???? ????? ?? ??????. ??? ?????? ?? Orders_Table. ?????? ADO AddNew / ????? ????? ?????? ??????? (?? ??????) ??? ???? ??????? ?? ??????. ??? ?????? ?????? ???? ADO ????? ???? ?? ??? ??? ?????? ?? Microsoft Excel. ???? ??????? ??????? ?????? ????:
    1. ?? ??????? ????? ?? Excel "? ??? ????? ?? ??? ?????.
    2. ?? ????? ??????? ??????? ??? Orders_Table. ???? ?? ??? ???? ????? ?????? ??????? ??????? ??????. ??? ??????? ??? ????, ????????? ?? ???? OFFSET ?? Excel ????? ?????? ??? ???????? ????? ??? ???? ?????.
    3. ????? Microsoft Excel ?? ?? ??????? ??? ????? Visual Basic.
  5. ???? ??? ????? 2. ??? ??????? ?? ????? ???? EmpDataTemplate.xls. ?????? ADO ??????? ??? ?????? ?? ?????? ????? ??????? ??????? ADO ?????? ???????? (INSERT INTO ?? SQL) ?? ??????. ??? ????? ???????? ?? ???????? ??????? (?? ???????) ?? ??????. ????? ??? ??? ???????? ????? ??????? ?????? ?????? ???? ???? ?? Excel. ??? ??? ?????? ????? Microsoft Excel ?? ?? ??????? ??? ????? Visual Basic.

  6. ???? ??? ????? 3. ??? ??????? ?? ????? ???? ProductsTemplate.xls. ??????? Microsoft ADO ?????? 2.1 DDL ? ???? ????? ?????? (ADOX) ?????? ???? ???? (?? ???? ??? ?????) ??? ??????. ?????? ??? ADO Recordset ?? ?????? ?????? ?? ????? ???????? ???????? AddNew / ?????? ???????. ??? ?????? ?????? ???? ADO ????? ???? ?? ??? ??? ?????? ?? Excel. ????? ?????? ??? Visual Basic ????????? ???????? ??????? Applications (VBA) ?? ????? Open ?? ??????. ??? ????? ??????? ??? ??? ?????? ? ??? ?? ??? ???? "????????" ????? ?? ?????? ?????? ????????? ???????? ??????? ???? ????? ?? ??? ??? ????????? ???????? ???????. ???? ??? ??????? ????? ???? ??? ???? ??? ??????? ?????? ?? ???? ??? ? ??? ??????. ?? ?? ???? ???? ??? ?? ??? ??????? ???? ???? ????? ??? ?????? ?????? ??????? ????????? ???????? ??????? ????? ?? "" ??????? ?????? ???? ???????? ?? ???? ?????? ?????? ??? ??????.

    ??????: ??? ??? ????????? ???????? ??????? ? ??? ?????? ??????? ThisWorkbook ?? VBAProject ProductsTemplate.xls.

  7. ???? ??? ????? 4. ??? ?????? ???? ??? ??????? ?? 1 ????? ????? ?????? ?????? ????? ??????? ???? ????????. ?? "????? 1?" ??????? (?? ??????) ??? ??????? ??? ???? ??? ????? ?? ?? ???. ????? 4 ???? ??????? ?? ????? ?????? ????? ???? Excel ??? ????? ?????? Access ?? ????? ??????? ?????? (?? INSERT INTO..FROM SELECT) ????? ????? ?? ???? ?? ???? Access ??? ???? Excel. ????? ?????? ????? ??? ???? Excel ?? ????? ?????? Access ?? ??? ??? ?????? ???? ???? ?? Excel. ?? ?????? Excel ?? ?????? ??? ????? Visual Basic.

  8. ???? ????? ??? ??? ????? ????? ?????? ?? ???? Excel. ??? ?????? ?? ??????? ???????? ?? ???? ??? ????? 5. ???? ?????? ?????? ??????? ?????? ???? ??? ???????. ??? ???? ?????? ???? ??? ("Sheet1 $" ?? "$ ????2") ????? ?????? ?????? ???? ??????? ???? ???? ????? ?????????. ?????? ?? ???? ???? ????????? ???????? ??? ???? 1? ?????? 1 ???? ?????. ???? ???? ????????? ?? ?????? ?????? ???? ?????? ?? ???? ????? ???? ????? ??? ????????.

    ??? ???? ??????? ?? ???? ???? ?? ???? ????? ?????? ?????? ???? ??????? ??? ?????? ?? ???? ?????.
???????? ????? ?????? ?????? (ASP):
  1. ????? ???? ???? ???? ExcelADO ?? ?????? ??????? ?? ???? ???. ???? ?? ?????? ????????? ?????? ??????? C:\InetPut\WWWRoot.
  2. ??? ??????? ??????? ??? ?????? ???? ??? ??????? ?? ?????? ???????:
    • EmpData.asp
    • Orders.asp
    • Data.mdb
    • EmpDataTemplate.xls
    • OrdersTemplate.xls

  3. ??????? ?????? ?? ASP ?? ??? ?????? ????? ??? ????? ?????? ?? ????? ???FileSystemObject. ??????? ??? ????? ??? ?? ???? ?????? ??????? ??? ???????? ????? ?? ???? ??????? ??? ?????? ???? ????? ??? ASP.
  4. ????? ??? Orders.asp (??? http://YourServer/ExcelADO/Orders.ASP) ?? ???? ?? ???? ???????? ???? Excel ?????? ?????? ?? ????? 1 ?? ????? Visual Basic.
  5. ????? ??? EmpData.asp (??? http://YourServer/ExcelADO/EmpData.ASP) ?? ???? ?? ???? ???????? ???? Excel ?????? ?????? ?? ????? 2 ?? ????? Visual Basic.
(?) Microsoft Corporation 2000? ???? ???? ?????. ????????? ??? Lori B. Turner ? Microsoft Corporation.

?????

?????? ??? ??????? ??????? ???? ??? ????? ???????? ??????? ?????? ?? "????? ??????? ?? Microsoft:
195951??????? HOWTO: ???????? ???????? ADO ?? ASP ?????? Excel
194124PRB: ??????? ??????? ?? NULL ??????? OpenRecordset DAO ??? Excel
193998HOWTO: ???????? ???????? ??????? ?????? ?? ASP
247412INFO: ??? ??? ???????? ??? Excel ?? Visual Basic
257819HOWTO: ??????? ADO ?? ?????? Excel ?? Visual Basic ?? VBA

???????

???? ???????: 278973 - ????? ??? ??????: 27/????/1426 - ??????: 6.1
????? ???
  • Microsoft Excel 2000 Standard Edition
  • Microsoft ActiveX Data Objects 2.5
  • Microsoft ActiveX Data Objects 2.6
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Active Server Pages 4.0
????? ??????: 
kbmt kbdownload kbdownload kbautomation kbfile kbprogramming KB278973 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????278973

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com