????? ??????? ????? OLE ?????? ???????? ??? Excel ????

?????? ????????? ?????? ?????????
???? ???????: 142193 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

OLE ??????? ???? ????? Visual FoxPro ?? Windows ???????? ?? ????????? ?????? ????????? ?? OLE. ???????? OLE ? ?????? Visual FoxPro ???? ??? ???? ??? Microsoft Excel ??? ???? ? ??? ???? ??? ?? ?????? ? ??? ?????? ?? ???? ?? ???? ?? ???????, ????? ???? ??? ? ?????? ??????? ?????? ????? ???? ??? Microsoft Excel. ???? ??? ?????? ??? ?????? ????? ?????? ???? ???.

??????? ????

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

  1. ??? ???? ???? ?? Microsoft Excel 5.0 ?? Excel Microsoft 7.0 (??? ?? Office 95) ?? Microsoft Excel 97 (??? ?? Office 97) ? ???? ???? ???? ?????? ???????? ?? ??? ???????.
  2. ??? ???? 3 ?????? ??? ????? ??????? ?? ???? ???? ????? ?? ???? ???????? ??????? ?? ???? ????????:
          Enter         In Cells
          ----------------------------
          Part #        A1
          Sales YTD     B1
          1             A2 through A4
          2             A5 through A7
          3             B2 through B7
    					
  3. ?? ??????? ?????? Excel Microsoft ? ???? ??? ???????? ??????. ??? ?? ???? ???? ?????? ?????? ?? ??? ?? ????? ?? ????? # ?????? 'SUM ???????? '????? ????? ???? ???' YTD' ???? ??? ??????? ???? ????????. ??? ??? ????? ????? ???? ??? "?????".
  4. ???? ??? ????? ??????? ?? ???? ???? 1 ???? ??????? ?????? ?????????? ?????? ??? ???? 1.
  5. ??? ??????. ?? ?? ?????? ?????? ?? ????? ?? Microsoft Excel. ?????? ??? ????????? ???????? ??????? ?????? ?? ??? ?????? ??
          C:\XLSheets\Testbook.xls.
    					
  6. ?? Microsoft Visual FoxPro ?? Windows? ????? ???????? ?????? ???? oleExcel.prg:
    *** Program oleExcel.prg *****
    #DEFINE xlLandscape 2
    #DEFINE xlDoNotSaveChanges 2
    
    DIMENSION laDemoData(4)      && For some Visual FoxPro users, data
    laDemoData(1)= 1024          && could come from table or view
    laDemoData(2)= 2048
    laDemoData(3)= 5120
    laDemoData(4)= "The Sample Message"
    
    loExcel = CREATEOBJECT("Excel.application") 
    
    WITH loExcel
       .Application.Workbooks.Open("C:\XLSheets\testbook.xls")
       .Application.Worksheets("Sheet3").Activate  && Select sheet
       
       .Range("b2").Value = 14444          && constants as data
       .Range("b3").Value = 25555
       .Range("b4").Value = 30001
    
       .Range("b6").Value = laDemoData(1)  && variables as data
       .Range("b7").Value = laDemoData(2)
       .Range("b8").Value = laDemoData(3)
       .Range("a12").Value = laDemoData(4)
    
       .Worksheets("Sheet3").PageSetup.Orientation = xlLandscape
       .ActiveSheet.PrintOut  && Example of printing the worksheet
    
       .Visible = .t. && See the results
       =MESSAGEBOX("Click OK to close Excel.") && Keep the program running, 
                                               && so Excel isn't stranded
    
       .ActiveWindow.Close(xlDoNotSaveChanges)
       .Quit()
    ENDwith
    					

?????

???? ????? ??????? Microsoft Excel "????? ????" ?????? ?? ????????? ???? ??? ??????? ?? ????????? ????? ? ?????? ??? ???????.

????? ?? ????????? ??? ?????? ?? ???????? ?? ?????? ?????? ?????? ?????? ???????? ??????? ?? "????? ????? Microsoft:
139051????? ????? ??????? ?? Microsoft Excel ???????? ??????? ???????? ?? OLE
132535PRB: ????? ????? ???? ??? ????? Microsoft Excel
138398PRB: ??????? ?? ?? "????? OLE ??????" ?? ???????

???????

???? ???????: 142193 - ????? ??? ??????: 25/????? ??????/1425 - ??????: 3.3
????? ???
  • Microsoft Visual FoxPro 3.0 Standard Edition
  • Microsoft Visual FoxPro 3.0b Standard Edition
  • Microsoft Visual FoxPro 5.0 Standard Edition
  • Microsoft Visual FoxPro 6.0 Professional Edition
????? ??????: 
kbmt kbcode kbhowto kbinterop KB142193 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????142193

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

 

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