????? ?? Office 2003 Web Components ?? Visual Studio .NET ?????? HOW ???:

?????? ????????? ?????? ?????????
???? ???????: 823982 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

???? ??? ??????? ???? ????? ??? ????? ????? wrappers ????? ?? Microsoft Office 2003 Web Components. ??? ??? ????? ????? ????? wrappers ????? ???? ????? ????? ??????? ?????? ??? ?? ??? ??????? ???? ?? ??????? ???????? Microsoft Visual Studio .NET ??.

???? ???????? wrappers ????? ???? ???? Microsoft Visual Studio .NET ?? ???? ?? ?????? ??????? ?????? Office 2003 ??? ??? ??????:
  • ???????
  • ???? ????????
  • PivotTable
??????? ????? ??? ???????? ????? ????? ????????? ???????? ????? wrappers ??? ?????? ?? ????? ????? ????????? ????????.

?????

???? Microsoft Visual Studio .NET ????? ???? ????? ????? ???? ?????? ????? ?????. ??? ????? ??? ????? ???? ????? ????? ??? ?????? ??? Office (OWC). ?? OWC ???????? ????? QueryInterface ??????? IDispatch ????? ?? ??????? ????? ?????. ??? ???? ?? ????? ????? IDispatch ????? ???? ?? ??????? ??? ?????? ??????? (DISPIDs) ???????.

??? ??? ???????? ????? ??? ????? ????? ???? ?? ??????? ???????? ClassInterfaceType.None ???? ???? interop COM ?????? IDispatch ??????? ????? ?? ???. ????? ????? IDispatch ??? DISPIDs.

??????? ????? ????? ??????? Wrappers ???

  1. ??? ????? ???? ??????? Visual Studio .NET.
  2. ?? ???? ???????? ?? ??? ???:
    1. ????? ???? ???? ???? owc11 ?? ?? ?????? ??? ??? ??????:
      md c:\owc11

      ????? ??????? c:\owc11
    2. ????? ????????? ???????? ?????? ?? C# ??????? Microsoft Windows ???????:
      /source "c:\program files\common files\microsoft shared\web components\11\owc11.dll" aximp
    3. ??? ??????? ???? ?? ?????? AxOWC11.dll:
      del c:\owc11\axowc11.dll
  3. ?? ???? ?? (??? ???????) ? ???? C:\OWC11\AxOWC11.cs.
  4. ????? [ToolboxItem(true)] ??? ????? ???? ?? ??????? ???? ??????? "?" ???? ???? ???????? "?" ???? PivotTable ??? ?? ???? ?? ??????? ???????:

    ???? ???????
     [System.ComponentModel.ToolboxItem(true)] 
     public class AxChartSpace : System.Windows.Forms.AxHost { 
      	... 
     } 
    ????? ???? ??????
     [System.ComponentModel.ToolboxItem(true)] 
     public class AxSpreadsheet : System.Windows.Forms.AxHost {
     	 ... 
     } 
    ???? PivotTable
     [System.ComponentModel.ToolboxItem(true)] 
     public class AxPivotTable : System.Windows.Forms.AxHost {
     	 ... 
     } 
  5. ??? ????? ???? ??????? ClassInterfaceType.None ??? ?? ??????? ???????:

    ???? ???????
     [System.Runtime.InteropServices.ClassInterface( 
      System.Runtime.InteropServices.ClassInterfaceType.None)] 
     public class AxChartSpaceEventMulticaster : OWC11.IChartEvents {
     	 ...
      } 
    ????? ???? ??????
     [System.Runtime.InteropServices.ClassInterface( 
      System.Runtime.InteropServices.ClassInterfaceType.None)]
     public class AxSpreadsheetEventMulticaster : OWC11.ISpreadsheetEventSink {
     	 ...
     } 
    ???? PivotTable
     [System.Runtime.InteropServices.ClassInterface( 
      System.Runtime.InteropServices.ClassInterfaceType.None)] 
     public class AxPivotTableEventMulticaster : OWC11.IPivotControlEvents {
     	 ... 
     } 
  6. ??? ????????? ??? AxOWC11.cs.
  7. ?? ???? ??????? ????? ?? "Visual Studio .NET" ? ?? ??? ???:
    1. ????? ????????? Interop Files\Microsoft.NET\Primary C:\Program ??? ????? ?? LIB ????? ??????:
      lib ?????? = c:\program files\microsoft.net\primary ????????? ??????? ??????? ????????; % path %
    2. ??? Microsoft.Office.Interop.OWC11.dll ? MSComCtl.dll ?? GAC ??? ?? ????? ????????? Interop Microsoft Office 2003 ????????:
      %windir%\assembly\GAC\Microsoft.Office.Interop.Owc11\11.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Owc11.dll ????

      ??? %windir%\assembly\GAC\mscomctl\10.0.4504.0__31bf3856ad364e35\mscomctl.dll
    3. ????? ????? ?????? AxOWC11.cs:
      csc /t:library /r:microsoft.office.interop.owc11.dll /r:adodb.dll /r:msdatasrc.dll /r:mscomctl.dll axowc11.cs
      ?????? ???? ????? ????? CS0108 ???????:
      ????? ???? ?????? ?????
      ?? ????? ??? ?????.
  8. ??? ????? Visual Studio .NET.
  9. ????? ???? ????? ?????? AxOWC11.dllToolbox:
    1. ??? ????? ??????? ? ???? ??? Customize Toolbox (?? Visual Studio .NET 2002) ? ?? ???? ??? ?????/????? ???? ????? ????? (?? Visual Studio .NET 2003) ??? ?? ???? ??? ????? ??????? .NET Framework ????????.
    2. ??? .NET Framework ?????? ? ???? ??? ???????.
    3. ?? ???? ???? ??? ????? ? ???? c:\owc11\axowc11.dll. ???? ??? ???.
    4. ???? ??? ????? ?????? Customize Toolbox ???? ??????.
??? ????? ????? Microsoft Visual Basic .NET ???? ?? ????? Microsoft Visual C# .NET ???? ???? ?? ????? ????? ?????? ?? ????? ??????? ??? ?? Toolbox ????? ??? ???? ?????? AxChartSpace ?????? AxPivotTable ??????? AxSpreadsheet. ????? ???? ????? ??? ???????? ??? ???????.

?????

?????? ??? ??????? ?????? ??? ????? ??????? Office XP Web Components ???????? Visual Studio .NET ???? ??? ????? ???????? ??????? ?????? ?? "????? ??????? ?? Microsoft:
328275HOW TO: ?????? ????? Office Web Components ?? Visual Studio .NET

???????

???? ???????: 823982 - ????? ??? ??????: 20/???/1424 - ??????: 1.5
????? ???
  • Microsoft Office 2003 Web Components
  • Microsoft Visual Basic .NET 2003 Standard Edition
  • Microsoft Visual Basic .NET 2002 Standard Edition
  • Microsoft Visual C# .NET 2003 Standard Edition
  • Microsoft Visual C# .NET 2002 Standard Edition
????? ??????: 
kbmt kbpia kbofficewebspread kbofficewebpivot kbofficewebchart kbhowto KB823982 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????823982

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

 

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