• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

5.1. Work with .NET

There are three main approaches to using .NET with Excel. You can use .NET to create:

  • Components that can be used from Excel macros. This approach works with all Excel versions and is much the same as creating COM components for use with Excel using Visual Basic 6.0. The .NET tools automatically generate the type libraries needed to use .NET objects from COM applications such as Excel.


    Note:

    Code used in this chapter and additional samples are available in ch05. xls.


  • Standalone applications that use Excel as a component. This approach works best with Excel XP and 2003, since those versions provide the files needed to use Excel from .NET applications smoothly. In this scenario, the user starts a stand-alone application to create or modify Excel workbooks.

  • Workbook-based applications that run all of their code as .NET. This approach works for Excel 2003 only. In this scenario, the user opens the workbook which automatically loads the .NET assembly containing the application code. The workbook contains a link to this assembly, so the workbook file (.xls) can be distributed to many different users and locations, while the assembly (.dll) resides in a single location (for example at a network address).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint