Rechercher et copier des Microsoft.Office.Excel.WebUI.dll et des Microsoft.Office.Excel.WebUI.Internal.dll

Si vous souhaitez ajouter par programme un élément Web Part Excel Web Access à une page SharePoint et modifier par programme le Excel Web Access, vous devez ajouter une référence aux DLL SharePoint requises. For example:

  • Microsoft.Office.Excel.WebUI.dll
  • Microsoft.Office.Excel.WebUI.Internal.dll
  • Microsoft.SharePoint.dll

On the computer running Microsoft SharePoint Server 2010, you can find a copy of Microsoft.Office.Excel.WebUI.dll and Microsoft.Office.Excel.WebUI.Internal.dll in the global assembly cache. Before you can add a reference to Microsoft.Office.Excel.WebUI.dll by using the Add Reference dialog box in Microsoft Visual Studio, you must first copy Microsoft.Office.Excel.WebUI.dll and Microsoft.Office.Excel.WebUI.Internal.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 and Microsoft.Office.Excel.WebUI.Internal.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.

Notes

[!REMARQUE] Repeat the steps to copy Microsoft.Office.Excel.WebUI.Internal.dll from the global assembly cache to a folder.

Pour trouver Microsoft.Office.Excel.WebUI.dll

  1. To start the command-prompt console, click Start, and then click Run.

  2. Dans la zone de texte Ouvrir le champ, tapez cmd .

    The command-prompt console appears.

  3. Utilisez la commande cd pour accéder au répertoire C:\Windows\assembly :

    Notes

    [!REMARQUE] The directory structure on your computer might be slightly different. This example uses a computer that has Windows Server 2008 installed.

    cd C:\Windows\assembly
    
  4. Utilisez la commande dir pour afficher le contenu du répertoire C:\Windows\assembly :

    C:\Windows\assembly>dir
    

    You will see contents similar to the following:

    Volume in drive C has no label.
    
    Directory of C:\\Windows\\assembly
    
    02/20/2010  09:22 AM    <DIR>          GAC
    02/20/2010  09:39 AM    <DIR>          GAC_32
    02/20/2010  09:32 AM    <DIR>          GAC_64
    02/22/2010  05:05 PM    <DIR>          GAC_MSIL
    02/22/2010  05:35 PM    <DIR>          NativeImages_v2.0.50727_32
    02/22/2010  04:33 PM    <DIR>          NativeImages_v2.0.50727_64
    02/20/2010  10:34 AM    <DIR>          NativeImages_v4.0.30219_32
    02/20/2010  10:35 AM    <DIR>          NativeImages_v4.0.30219_64
    02/22/2010  05:04 PM    <DIR>          temp
    02/22/2010  05:05 PM    <DIR>          tmp
                   0 File(s)              0 bytes
                  10 Dir(s)  104,032,665,600 bytes free
    
  5. Utilisez à nouveau la commande cd pour modifier le répertoire et accéder au gac_msil répertoire :

    C:\\Windows\\assembly>cd gac_msil
    
  6. Utilisez la commande dir pour afficher le contenu du répertoire C:\Windows\assembly\GAC_MSIL :

    C:\\Windows\\assembly\\GAC_MSIL>dir
    

    You will see contents similar to the following:

    Volume in drive C has no label.
    Directory of C:\\Windows\\assembly\\GAC_MSIL
    ...
    02/20/2010  07:57 AM    <DIR>          Microsoft.Office.Excel.Server.Udf
    02/20/2010  07:57 AM    <DIR>          Microsoft.Office.Excel.Server.WebServices
    
    02/20/2010  07:57 AM    <DIR>          Microsoft.Office.Excel.WebUI
    02/20/2010  07:57 AM    <DIR>          Microsoft.Office.Excel.WebUI.Internal
    ...
    02/20/2010  07:57 AM    <DIR>          Microsoft.SharePoint
    ...
    0 File(s)              0 bytes
                 739 Dir(s)  100,594,409,472 bytes free
    
  7. Maintenant que vous avez localisé Microsoft.Office.Excel.WebUI.dll et Microsoft.Office.Excel.WebUI.Internal.dll, vous pouvez les copier dans un dossier de votre choix.

Pour copier Microsoft.Office.Excel.WebUI.dll

  1. Utilisez à nouveau la commande cd pour changer le répertoire en Microsoft.Office. Excel. Interface utilisateur web:

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

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

    You will see contents similar to the following:

    Volume in drive C has no label.
    Directory of C:\\Windows\\assembly\\GAC_MSIL\Microsoft.Office.Excel.WebUI
    
    02/20/2010  07:57 AM    <DIR>          .
    02/20/2010  07:57 AM    <DIR>          ..
    02/20/2010  07:57 AM    <DIR>          14.0.0.0__71e9bce111e9429c
                   0 File(s)              0 bytes
                   3 Dir(s)  104,006,115,328 bytes free
    
  3. Use the cd command again to change the directory:

    C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Excel.WebUI>cd 14.0.0.0__71e9bce111e9429c
    
  4. Utilisez la commande copier pour copier Microsoft.Office.Excel.WebUI.dll dans un dossier de votre choix.

    Dans l’exemple suivant, Microsoft.Office.Excel.WebUI.dll est copié dans C:\WebUIAssembly, où C:\WebUIAssembly est un dossier que vous avez créé précédemment :

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

Exemple

The following is an example of the result of using the command prompt to locate and copy Microsoft.Office.Excel.WebUI.dll to a folder.

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

02/20/2010  09:22 AM    <DIR>          GAC
02/20/2010  09:39 AM    <DIR>          GAC_32
02/20/2010  09:32 AM    <DIR>          GAC_64
02/22/2010  05:05 PM    <DIR>          GAC_MSIL
02/22/2010  05:35 PM    <DIR>          NativeImages_v2.0.50727_32
02/22/2010  04:33 PM    <DIR>          NativeImages_v2.0.50727_64
02/20/2010  10:34 AM    <DIR>          NativeImages_v4.0.30219_32
02/20/2010  10:35 AM    <DIR>          NativeImages_v4.0.30219_64
02/22/2010  05:04 PM    <DIR>          temp
02/22/2010  05:05 PM    <DIR>          tmp
                0 File(s)              0 bytes
              10 Dir(s)  104,032,665,600 bytes free
C:\Windows\assembly>cd gac_msil

C:\Windows\assembly\GAC_MSIL>dir
  Volume in drive C has no label.
  Directory of C:\Windows\assembly\GAC_MSIL
...
02/20/2010  07:57 AM    <DIR>          Microsoft.Office.Excel.Server.Udf
02/20/2010  07:57 AM    <DIR>          Microsoft.Office.Excel.Server.WebServices

02/20/2010  07:57 AM    <DIR>          Microsoft.Office.Excel.WebUI
02/20/2010  07:57 AM    <DIR>          Microsoft.Office.Excel.WebUI.Internal
...

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

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

02/20/2010  07:57 AM    <DIR>          .
02/20/2010  07:57 AM    <DIR>          ..
02/20/2010  07:57 AM    <DIR>          14.0.0.0__71e9bce111e9429c
                0 File(s)              0 bytes
                3 Dir(s)  104,006,115,328 bytes free

C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Excel.WebUI>cd 14.0.0.0__71e9bce111e9429c

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

C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Excel.WebUI\14.0.0.0__71e9bce111e9429c>

Voir aussi

Tâches

Concepts