How to: Locate and Copy Microsoft.Office.Excel.WebUI.dll

If you want to programmatically add an Excel Web Access Web Part to a SharePoint page and programmatically change the Excel Web Access Web Part, you must add a reference to Microsoft.Office.Excel.WebUI.dll.

On the computer where you installed Microsoft Office SharePoint Server 2007, you can find a copy of Microsoft.Office.Excel.WebUI.dll in the global assembly cache. Before you can add a reference to Microsoft.Office.Excel.WebUI.dll using the Microsoft Visual Studio 2005 Add Reference dialog box, you must first copy Microsoft.Office.Excel.WebUI.dll from the global assembly cache to a folder. Then, you can use the Browse tab in the Add Reference dialog box to browse to the folder that contains the copy of Microsoft.Office.Excel.WebUI.dll.

The following steps show how to:

  • Locate Microsoft.Office.Excel.WebUI.dll.

  • Copy Microsoft.Office.Excel.WebUI.dll from the global assembly cache to a folder of your choice.

To locate Microsoft.Office.Excel.WebUI.dll

  1. Start the command prompt console: Click Start, and then click Run.

  2. In the Open field box, type cmd.

    The command prompt console appears.

  3. Use the cd command to navigate to "C:\WINNT\assembly" directory:

    cd C:\WINNT\assembly
    
  4. Use the dir command to display the content in "C:\WINNT\assembly" directory:

    C:\WINNT\assembly>dir
    

    You will see something like the following:

    Volume in drive C has no label.
    Directory of C:\WINNT\assembly03/10/2005  05:52 PM    <DIR>          GAC
    07/17/2006  04:07 PM    <DIR>          GAC_32
    07/17/2006  04:07 PM    <DIR>          GAC_MSIL
    03/10/2005  05:52 PM    <DIR>          NativeImages1_v1.1.4322
    03/14/2005  03:53 PM    <DIR>          NativeImages_v2.0.40903_32
    01/04/2006  05:14 PM    <DIR>          NativeImages_v2.0.50727_32
    07/17/2006  04:07 PM    <DIR>          temp
    07/17/2006  04:07 PM    <DIR>          tmp
                   0 File(s)              0 bytes
                   8 Dir(s)  20,462,927,872 bytes free
    
  5. Use the cd command again to change the directory and navigate to the gac_msil directory:

    C:\WINNT\assembly>cd gac_msil
    
  6. Use the dir command to display the contents of the "C:\WINNT\assembly\GAC_MSIL" directory:

    C:\WINNT\assembly\GAC_MSIL>dir
    

    You will see something like the following:

    Volume in drive C has no label.
    Directory of C:\WINNT\assembly\GAC_MSIL
    
    07/17/2006  04:07 PM    <DIR>          .
    07/17/2006  04:07 PM    <DIR>          ..
    07/17/2006  04:07 PM    <DIR>          Accessibility
    ...
    03/30/2006  04:31 PM    <DIR>          Microsoft.Office.Excel.Server     
    ...
    03/30/2006  04:31 PM    <DIR>          Microsoft.Office.Excel.WebUI
    ...
    
  7. Now that you have located Microsoft.Office.Excel.WebUI.dll, you can copy it to a folder of your choice.

To copy Microsoft.Office.Excel.WebUI.dll

  1. Use the cd command again to change the directory to "Microsoft.Office.Excel.WebUI":

    C:\WINNT\assembly\GAC_MSIL>cd Microsoft.Office.Excel.WebUI 
    
  2. Use the dir command to display the contents:

    C:\WINNT\assembly\GAC_MSIL\Microsoft.Office.Excel.WebUI>dir
    

    You will see something like the following:

    Volume in drive C has no label.
    Directory of C:\WINNT\assembly\GAC_MSIL\Microsoft.Office.Excel.WebUI
    
    03/30/2006  04:31 PM    <DIR>          .
    03/30/2006  04:31 PM    <DIR>          ..
    03/30/2006  04:31 PM    <DIR>          12.0.0.0__71e9bce111e9429c
                   0 File(s)              0 bytes
                   3 Dir(s)  20,463,235,072 bytes free
    
  3. Use the cd command again to change the directory:

    C:\WINNT\assembly\GAC_MSIL\Microsoft.Office.Excel.WebUI>cd 12.0.0.0__71e9bce111e9429c
    
  4. Use the copy command to copy Microsoft.Office.Excel.WebUI.dll to a folder of your choice.

    In the following example, it is copied to "C:\WebUIAssembly":

    C:\WINNT\assembly\GAC_MSIL\Microsoft.Office.Excel.WebUI\12.0.0.0__71e9bce111e9429c>copy Microsoft.Office.Excel.WebUI.dll c:\WebUIAssembly
            1 file(s) copied.
    

Example

The following is an example of the results you will get when you use the command prompt to locate and copy Microsoft.Office.Excel.WebUI.dll to a folder.

C:\WINNT\assembly>dir
Volume in drive C has no label.
Directory of C:\WINNT\assembly

03/10/2005  05:52 PM    <DIR>          GAC
07/17/2006  04:07 PM    <DIR>          GAC_32
07/17/2006  04:07 PM    <DIR>          GAC_MSIL
03/10/2005  05:52 PM    <DIR>          NativeImages1_v1.1.4322
03/14/2005  03:53 PM    <DIR>          NativeImages_v2.0.40903_32
01/04/2006  05:14 PM    <DIR>          NativeImages_v2.0.50727_32
07/17/2006  04:07 PM    <DIR>          temp
07/17/2006  04:07 PM    <DIR>          tmp
               0 File(s)              0 bytes
               8 Dir(s)  20,462,927,872 bytes free

C:\WINNT\assembly>cd gac_msil

C:\WINNT\assembly\GAC_MSIL>dir
 Volume in drive C has no label.
 
 Directory of C:\WINNT\assembly\GAC_MSIL

07/17/2006  04:07 PM    <DIR>          .
07/17/2006  04:07 PM    <DIR>          ..
07/17/2006  04:07 PM    <DIR>          Accessibility
...
03/30/2006  04:33 PM    <DIR>          Microsoft.AnalysisServices
03/30/2006  04:31 PM    <DIR>          
...
03/30/2006  04:31 PM    <DIR>          Microsoft.Office.Excel.Server
03/30/2006  04:27 PM    <DIR>          
...
03/30/2006  04:27 PM    <DIR>          Microsoft.Office.Excel.Server.Udf
03/30/2006  04:31 PM    <DIR>          Microsoft.Office.Excel.Server.WebServices

03/30/2006  04:31 PM    <DIR>          Microsoft.Office.Excel.WebUI
...
03/30/2006  03:12 PM    <DIR>          System.Workflow.Runtime
07/17/2006  04:07 PM    <DIR>          System.Xml
               0 File(s)              0 bytes
             146 Dir(s)  20,462,927,872 bytes free

C:\WINNT\assembly\GAC_MSIL>cd Microsoft.Office.Excel.WebUI

C:\WINNT\assembly\GAC_MSIL\Microsoft.Office.Excel.WebUI>dir
 Volume in drive C has no label.

 Directory of C:\WINNT\assembly\GAC_MSIL\Microsoft.Office.Excel.WebUI

03/30/2006  04:31 PM    <DIR>          .
03/30/2006  04:31 PM    <DIR>          ..
03/30/2006  04:31 PM    <DIR>          12.0.0.0__71e9bce111e9429c
               0 File(s)              0 bytes
               3 Dir(s)  20,463,235,072 bytes free

C:\WINNT\assembly\GAC_MSIL\Microsoft.Office.Excel.WebUI>cd 12.0.0.0__71e9bce111e
9429c

C:\WINNT\assembly\GAC_MSIL\Microsoft.Office.Excel.WebUI\12.0.0.0__71e9bce111e9429c>copy Microsoft.Office.Excel.WebUI.dll c:\WebUIAssembly
        1 file(s) copied.

C:\WINNT\assembly\GAC_MSIL\Microsoft.Office.Excel.WebUI\12.0.0.0__71e9bce111e9429c>

See Also

Tasks

How to: Programmatically Add an Excel Web Access Web Part to a Page
How to: Trust Workbook Locations Using Script

Concepts

Excel Services Alerts
Excel Services Known Issues and Tips