????? ??????? ??????? ?? ???? Excel ?? DAO

?????? ????????? ?????? ?????????
???? ???????: 190195 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

?? ???? ?????? ????? ISAM Excel ?????? ????? ???????? ???? ????.

??????? ????

??? ??? ???? ???? ?? ???? Excel ???? ????? ??? ???? ???????? ISAM ?? ????? ????? ??? ???????? ???? ??? ?? ???? ???? ????. ???? ?? ?? ??? ????? ???? ??????? ?? ???? ?? ???? ??? ???????? ????. ??? ???? ??????? ?? ???? ???? ??????? ???????? ?? ????? ????? ?? ???? Excel:
   male   female children teens
   11     cc     78       ee
   22     xx     33       ff
   45     uu     56       oo
				

??? ?????? ????? ???????? ?? ???? ?????? ????? ISAM ????? ???? ????? ??? ???? ??? ??? ????? ???? ?????. ??? ??? ???? ?? ???? ??? ????? ?????? ?????: ????? ??? ???? ?? ??????? ??? ??????? ???? ????? ??? ??????? ????????. ??? ???? ??????:
   named range 'myRange1' :
   male     female    children     teens

   named range 'myRange2' :
   11   cc   78   ee
   22   xx   33   ff
   45   uu   56   oo
				

???? ????? ??????? ??? Excel ???????? ????? ?? ????? ?????? ?????? ???. ??? ???? ?? ???? ???? ???? ???? ???? ?? ????? ??? ??? ???? ?? ????????.

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

???? ??????? ??????? ?????? ????:
  1. ????? ????????.
  2. ?? ???? ???????? ???? ??? ????? ?? ???? ??? ?????.
  3. ???? ??? ????? ?? ???? ??? ??? ????.
??????: ????? ?????? ???? ??? ???? ???????. ??? ?? ??? ????? ? ????? ??? ????? ???????? ????.

???????? ???????? ?????? ?? ??????? ??? ?????? ???? ??? ??????? ???? ??? ?????? ?? ????? ???.

????? Excel

  1. ????? ??? Excel test.XLS ? ???????? ???????? ??????? ?? sheet1:
       excel File : test.xls with the following entries:
    
            male  female    children   teens
             11    cc       78           ee
             22    xx       33           ff
             45    uu       56           oo
    					
  2. ????? ???? ???? myRange1 ? myRange2, ?? ?????? ???? ????? ??? ???????? ????????.
          named range : myRange1
    
          male female children teens
    
          named range  : myRange2
    
          11     cc   78   ee
          22     xx   33   ff
          45     uu   56   oo
    
    					

????? Visual Basic

  1. ????? ????? EXE ????? ???? ???? "DAO_EXCEL."
  2. ?? ??????? ??????? ???? "?????" ??? ?? ??? ???? ???????? ????? 3.5 Microsoft DAO.
  3. ?? ???? CommandButton ?? ???????.
  4. ?? ???? ???????? ???????? ??????? ?? ???? ????????? ???????? ???????:
          private Sub Command_click1
    
          im dbtmp As DAO.Database
          im tblObj As DAO.TableDef
          im rs As DAO.Recordset
    
          et dbtmp = OpenDatabase_
               ("<complete path>\test.xls", False, True, "Excel 8.0;")
    
          DoEvents
    
          Set rs = dbtmp.OpenRecordset("select * from `myRange2`")
          While Not rs.EOF
              For x = 0 To rs.Fields.Count - 1
                  Debug.Print rs.Fields(x).Value
              Next
              rs.MoveNext
          Wend
          End Sub
    
          Note the reverse apostrophe "`" while specifying the range
          name(myrange2).
    
    					
????? ??????? ??????? ??? ?? ?????:
  11
  cc
  78
  ee
  22
  xx
  33
  ff
  45
  uu
  56
  oo
				

?????

?????? ?????? ??? ??????? ?????? ????? ??????? ?? Excel ?? ???? DAO. ???? ???? ???? ??? ADO ???????-> ???? Excel.

???????

???? ???????: 190195 - ????? ??? ??????: 21/????/1426 - ??????: 2.3
????? ???
  • Microsoft Visual Basic 6.0 Learning Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • The DAO SDK
????? ??????: 
kbmt kbdatabase kbhowto kbiisam KB190195 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????190195

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

 

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