ExcelADO.exe ????? illustrates ???? ????? ?? ???? ??? ActiveX ???? ???????? (ADO) Microsoft Jet OLE DB 4.0 ??????? ?? ??? ????? ?? Microsoft Excel ????????????? ??? ???? ????? ?? ??? ???
????? ????? Microsoft ??????? ?????? ?? ??????? ?? ??? ?????? ??::
ExcelADO.exe
(http://download.microsoft.com/download/excel2000/Sample/12_27_2000/W98NT42KMe/EN-US/Excelado.exe)
?????? ??????: ?????? 12, 2000
Microsoft ?????? ??????? ?? ???? ??????? ???? ?? ???? ??? ???? ????? ?? ???, ????? ???? ?????? ?? ????? ?? ???? ?? Microsoft ???????? ??? ?????::
119591
(http://support.microsoft.com/kb/119591/EN-US/
)
?????? ?????? ?? Microsoft ?????? ??????? ???? ??????? ????
Microsoft ????? ?? ??? ?? ????? ?? ????? ?? ??? Microsoft ?? ?? ?????? ?? ?????? ???? ??????? ?????-??? ?????????? ?? ????? ???? ?? ????? ????? ?? ?? ??.. ????? ?? ?? ???????-??????????? ????? ?? ???????? ???? ??? ?? ?? ????? ??? ???? ?? ??????? ???????? ?? ????? ??? ??? ???? ??..
ADO ?? ????? ??????
????? ???? ?? ??? ???? ??????????? ???? ?? ??? Excel ????????????? ?? ???? ?? ??????? ???? ?? ??? ADO ?? ???? ???, ??????, ?? ????? ?? ??????? ?? Excel ?? ???:
- ????????. Microsoft Excel ?? ?? ???-??-????????? ActiveX ????? ??? ADO ???-????????? ???? ??, ?? costly ???-??-????????? ??? ?? overhead ?????? ???
- Scalability. ??? ?????????, ?? ??? ?? ???? ?? ????? desirable Microsoft Excel ?? ???????? ???? ?? ???? ADO ?? ???? ????????????? ??? ???? ?? ????? ???? ?? ??? ???? scaleable ?????? ?? presents ???
ADO ????? ???? ?? ???? strictly ?????? ???? ?? ???? ????????????? ??? ??????????? ???? ?? ???? ?? ADO ?????? ?? ????? ?? ?????? ?? ???? ???? ?? ??? ????? ???? ?? ???? ??? ???????, pre-formatted ?? ?? ???? ????????????? ??? ???? ??????????? ?? ???? ??? ?? ???????? ???? ??? ??? ?? ?? ???????? ?? "?????" ??????? ???? ???????? ???? ?? ???, ?? ??????? ?? ??? ?? ???? ????????????? ??? ?????? ?? ??? ?? ??????? ???? ?? ???? ???
??? OLE DB ??????? Specifics Excel ??????????????? ?? ???
Microsoft Jet ??????? ????? ?????? ??????? ????? ?????????? ?????? ????? ???? (ISAM) ??????? ??? ???? ??????? ????? ??????, Excel ?????????????, ???? ???? ?? ??????? ?? ??? ????? ???? ?? ???? ??? ????? Microsoft Jet 4.0 OLE DB ??????? ?????? ??????? ???????? ?? ????? ?? ??? ?? ??????? ?????? ??? ????????? ????????? ????? ?? ??????? ?? ???? ??? OLE DB ??????? Microsoft Excel ????????????? ?? ??? ????? ??????? ???????? ?? ?????? ???? ??:
- Excel 3.0
- Excel 4.0
- Excel 5.0
- Excel 8.0
???:: Microsoft Excel 5.0 ?? 7.0 (95) ??????????????? ?? ??? Excel 5.0 ????? ??????? ?????? ?? ????? ?? Microsoft Excel 8.0 (97) ?? 9.0 ?? ??? Excel 8.0 ????? ??????? ?????? ?? ????? ???? (2000) ???????????????? Excel 97 ?? Excel 2000 ?????? ??? ExcelADO.exe ????? Excel ????????????? ?? ????? ???? ???
????? ????? ??? ??? ADO ?? ???? Excel 97 (?? 2000) ??????? ????????????? demonstrate:
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
?????? ?????? Conventions??? Excel ????????????? ??? ?? ??? ?? ?? ?????? (?? ??????) ?????? ?? ???? ???:
- ?? ???? ????? ?? ???? ??? ????? ?? ??? ?? ????? ???? (?????? ?? ???, [Sheet1 $] [???? ?????????? $] ??)? ?? ????? ?? ???????? ????????????? ?????? ?????????? ?? ???? ????? ?????? ?? ????? ??? ???? ???
oRS.Open "Select * from [Sheet1$]", oConn, adOpenStatic
- ????????? ??? (?????? ?? ???, [Table1]) ?? ??? ???? ?????? ?? ????? ?????
oRS.Open "Select * from Table1", oConn, adOpenStatic
- ???? ??????? ??? ?? ??? ???? ?????? ?? ????? ???? (?????? ?? ???, [Sheet1 $ A1: B10])?
oRS.Open "Select * from [Sheet1$A1:B10]", oConn, adOpenStatic
?????? ????? ???Excel ?????????????, ?? ??? ???? ?????? ??? ???? ?????? ?? ???? ????? ??? ?????? (?? ????? ???) ?? ??? ???????? ??? ??? ??? ???? ?????? ??? ???? ????? ???, ?? ????????? ?? ????
HDR ???? =??? ???? ??????? ???????? ??? ????????? ???? ???? ?????? ????? ??? ??? ???? ??, ??? OLE DB ??????? ???????? ??? ?? ??? ?????? ?? ??? ?? (F1 ???? ?????? ?? ???????????? ???? ??, ???? F2 ???? ????? ????? ?? ??????? ???, ?? forth ???)?
???? ?????????????? ???????, ???? ?? ?????? ??? Excel ?????? ??? ??????? ?? ???? ?????? ?? ????????? ???? ?? ??? ???? ?? ????? ???? ??? ???? ????, OLE DB ??????? ?????? "?????" ????? ?? ??? ???? ?????? ?? ??? ???? ????? ??? ????????? ?? ?????? ????? ????? ???? ??? ??????? ??????? (8) ?????????; ???? ?? ??? ????? ???? ?? ??? ????????? ?? ?????? ?? (1) ?? sixteen (16) ?? ??? ?? ??? ??? ??? ????????? ?? ????? ???? ?? ??? ????????? ?? ?????? ????????? ?? ???? ???
MAXSCANROWS???? ??????? ???????? ?? ????????? ????? ??? ??? ?????
??????? ????? ?? ??? ????? ????
ExcelADO.exe ????? ??? ??? ???? EXE Visual Basic ?????????, ?????? ????? ????? (ASP), Excel 97 ?? Excel 2000 ??????????????? ?????????? ?? ???? Microsoft Access 2000 ??????? ?? ??? ??? ????? ???? ???? ???? ??????? ????? ??????????? ???:
Visual Basic ???? EXE ????????? ??????- ExcelADO.vbp
- Form1.frm
- Form1.frx
?????? ????? ?????Microsoft Excel ???????????????- OrdersTemplate.xls
- EmpDataTemplate.xls
- ProductsTemplate.xls
- SourceData.xls
Microsoft Access ???????????? ?? ????? ???? ????
. Exe ????? ?? ???? ??????? ?? ??????? ?? ????????
Visual Basic ????????? ?? ????? ???? ?? ???:
- Visual Basic ??? ExcelADO.vbp ????? ??????
- ????? ?????????????????, ?? ??? ??????????, ?? ???? ??? ?????? ?? ??? ??? ????Microsoft ADO DDL ?? ??????? ?? ??? ext., ??Microsoft ActiveX ???? ???????? ?????????. ?? ????? ??? ????? ADO 2.5 ?? ADO 2.6, ????? ???? ???????? ?? ??? ??????? ??????? ??? ?????
- ????????? ?? ????? ?? ??? F5 ????? ?????? ???????? ?? ??? ??????? ????? ???? ???
- ????? ????,????? 1:.
?? ????? ?? OrdersTemplate.xls ?? ?? ????????? ????? ??? ?? ?? ADO ????????????? ?? ?????? ???? ?? ??? ????? ???? ?? ?? ??? ???? ?? ??Recordset?? ??? ?????? ?? ???? ????????????? ??? ????????? ?????? ??? ?????? ?? ??? ??Orders_Table. ?? ADO ????? ???? ??AddNew/??????????????????? ??? ????????? ?????? ?? ??? ?????? (?? ?????????) ????? ?? ??? ???????? ?? ??????? ??? ?????? ????, ADO?????????? ?? ?? ????????????? Microsoft Excel ??? ????????? ???? ???? ??? ??? ???? ?? ???, ????? ????? ?? ???? ????:
- ????? ???????????? ????Excel ???, ?? ??? ???? ???????, ?? ???? ??? ?? ??? ????????????? ????.
- ??? ????????? ????? ?? ???? ?? ??? ????Orders_Table. ????? ??? ?? ???? ?? ?????? ???????? ???? ?? ??? ????????? ??? grown ??? ????????? ??? ????? ??? ??, ?? Excel ?? ????? ?????? ?? ??? ??? ?????????? ??? ????? ??? ???? ?? ??? compute ???? ?? ????
- Microsoft Excel ?? ???? ?????? ?? ???? Visual Basic ????????? ?? ??? ???
- ????? ????,????? 2.
?? ????? ?? EmpDataTemplate.xls ?? ?? ????????? ????? ??? ?? ????????????? ?? ?????? ???? ?? ??? ADO ?? ????? ???? ?? ?? ?? ????? ???? ??????????? ????(???????? ??? SQL ???) ???? ?? ????????????? ??? ???????? ???? ?? ??? ADO ??????? ??????? ????????????? ??? ????????? ?????? (?? ????????) ?? ???? ????? ??? ??? ?? ???? ??????????? ???? ??, ?? ??????? ??? ?? ?? ?????? ????????????? ?? Excel ??? ????????? ???? ???? ??? ?? ?? ????????????? ?? ??????? ???? ?? ??? Microsoft Excel ?? ???? ??, ?? Visual Basic ????????? ?? ??????
- ????? ????,????? 3.
?? ????? ?? ProductsTemplate.xls ?? ?? ????????? ????? ??? ?? ????? Microsoft ADO ????????? 2.1 DDL ?? ??????? ???????? ????????? ?? ???? ?? ???? ?? ?????? ?? ??? (ADOX) (?? ???? ?? ??????????) ?? ??? ????????????? ?? ???? ??? ADORecordset??? ?????? ?? ??? ?? ??????? ?? ?? ???? ?? ????? ?? ????? ??AddNew/?????????????? ?? ??????? ??? ?????? ????, ADO?????????? ?? ?? ????????????? ?? Excel ??? ????????? ???? ???? ??? ????????????? ??? Visual Basic ?????? ??? ?? ??? ????????? (VBA) ?? ????????????????????? ?? ??? ?????? ?????? ?? ????? ?? ?? ?? ????????????? ?? ????? ??; ??? ?? "??????" ?????????? ????????????? ??? ????? ??, ?? ?????? ??? ?????????? ???????? ???? ?? ?? ?? ?????? ??? ????? ???? ??? ?? ????? presents ??????? ??? ??????? ?? ?? ??? ????? ?? ??? ?? ???? ?? ??? ??? ?????? ?? ??? ?? ????? ??? ??? ??? ????????? ???????? ????????????? ??? ??????? ?? ??? ???? ?? ?????? ??? ?? ?? ???? ??? ?? "?????" ??????? ?? ?? ???? ?? ?????? ??? ?? ?????? ??? alone ??????? ?? ????? ?? ??? ?? ???????? ?? ??? ???? ???? ?? ???? ???
???:: ??? ?????? ??? ?? ???? ????, ?????ThisWorkbook??????? VBAProject ProductsTemplate.xls ?? ????
- ????? ????,????? 4.
?? ????? ????? 1 ?? ??? ??? ?? ?? ?????? ???? ??, ????? ????? ?? ?? ???? ??????????? ???? ?? ??? ????? ???? ???? ?? ????? ??? ????? 1, ??? ?????? (?? ?????????) ????? ???? ??? ?? ?????????? ?? ??? ?? ??? ???? ????? 4 ????? ?????? ???? ?????? ??? Excel ?????? ?? ???? Access ??????? ?? ??? attaching ?? ????? ?????? (?? ??? ??? ???????? ????...??? FROM) Excel ?????? ?? ??? Access ?????? ??? ???? ?????? ?? ????????? ???? ???? ?? ???? ?????????? ????? ??, ?? ??? ?? Access ??????? ?? Excel ?????? detached ?? ?? ?????? ????????????? ?? Excel ??? ????????? ???? ???? ??? Excel ?? ???? ??????, ?? Visual Basic ????????? ?? ??????
- ????? ????? illustrates ?? ?? ?? ??? Excel ????????????? ?? ???? ??? ???? ???? ??? ???????????????-???? ???? ???, ?? ???? ???????? 5. ??????? ????? ?? ???? ?????? ????? ?????? ?? ??????? ????????? ???? ???
??? ?? ???? ???? ????????????? ("Sheet1 $" ?? "Sheet2 $") ?????? ?? ??? ?? ??? ????, ??????? ????? ?? ?????????? ?? ??? ????? ?? ?? ?????? ?? ??????? ????????? ???? ??? ????? ??? ?? ????? ?????? ???? necessarily ???? ?????? 1, ????? 1 ?????????? ?? ?? ??? ????? ?? ?? ?????? ?????????? ??? ???? ??? ???? ???? ?? ??????? ???? ?? ??????? ???? ???
??? ?? ???? ??????? ?????? ??? ?? ?? ????????? ?????? ?????, ??????? ????? ?????????? ?? ???? ?? ?????? ?? ??????? ????????? ???? ???
?????? ????? ????? (ASP) ?? ????? ???? ?? ???:
- ??? ?? ?? ??? ?????? ?????ExcelADO???? ??? ????? ?? ??? ?????????? ???? ????? ?????????? ?? ??? ??????? ?? ?? C:\InetPut\WWWRoot ??? ?????
- ?? ???? ???? ??? ??? ???? ?? ??????? ?? ??? ????? ??????? ?? ????????? ?????:
- EmpData.asp
- Orders.asp
- Data.MDB
- EmpDataTemplate.xls
- OrdersTemplate.xls
- ?? ????? ??? ASP ????????? ????? ?? ??? ????????????? ???????? ?? ??????????????????????? ??? ????FileSystemObject. ?? ????????????????, ?? ??? ????? ?? ??? ??????? ????????? ?? ????? ??? ?? ?????? ASP ??????? ?? ??? ???? ????? ???? ??????
- Orders.asp (??????, http://YourServer/ExcelADO/Orders.ASP) ?? ??????? ????, ?? ??? ???? ?? ???????? ???? Excel ????????????? ??? ?? ?? ???? ????????? ???? ??????? 1:?? Visual Basic ??????????
- EmpData.asp (??????, http://YourServer/ExcelADO/EmpData.ASP) ?? ??????? ????, ?? ??? ???? ?? ???????? ???? Excel ????????????? ??? ?? ?? ???? ????????? ???? ??????? 2?? Visual Basic ??????????
(?) Microsoft Corporation 2000, ??? ?????? ????????? ???????? Lori B. Turner, Microsoft Corporation ?????? ???
???????? ??????? ?? ???, ????? ???? ???????? ?? ????? ?? ?????? ?? Microsoft ???????? ??? ?????::
195951
(http://support.microsoft.com/kb/195951/
)
HOWTO: ?????? ?? ASP ?? ADO ?? ????? ?? Excel ???? ?????? ????
194124
(http://support.microsoft.com/kb/194124/EN-US/
)
PRB: Excel ??? NULL DAO OpenRecordset ????? ?? ??? ??? ??? ??
193998
(http://support.microsoft.com/kb/193998/EN-US/
)
HOWTO: ????? ?? ???????? ??????? ???? ??? ASP
247412
(http://support.microsoft.com/kb/247412/EN-US/
)
???????: Visual Basic ?? Excel ??? ???? ??????????? ???? ?? ??? ???????
257819
(http://support.microsoft.com/kb/257819/EN-US/
)
HOWTO: ????? ADO Visual Basic ?? VBA ?? ???? ?? Excel ?? ???
???? ID: 278973 - ????? ???????: 29 ??????? 2010 - ??????: 4.0
???? ???? ???? ??:
- Microsoft Excel 2000 Standard Edition
- Microsoft Visual Basic 6.0 Professional Edition
- Microsoft Active Server Pages 4.0
| kbdownload kbautomation kbfile kbprogramming kbmt KB278973 KbMthi |
???? ?????? ??????????????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:
278973
(http://support.microsoft.com/kb/278973/en-us/
)