Office Logo  Zurück zur Hauptseite

Add-Ins

       Allgemeines über Add-Ins

       Kurzbeschreibung von Add-Ins

       In Microsoft Excel enthaltene Add-Ins

       Arten von Add-Ins

           Add-Ins vom Typ 'xla'

           Add-Ins vom Typ 'dll'

           Add-Ins vom Typ 'xll'

       Speicherort von Add-Ins

       Add-In-Namen, die mit einem Unterstrich beginnen

       Dictator und Committee Add-Ins

           Dictator Add-Ins

           Committee Add-Ins

       Registry-Schlüssel für Add-Ins

       Eigene Add-Ins erstellen

           Add-In vom Typ 'xla' erstellen

           Add-In vom Typ 'dll' erstellen (COM Add-In)

           Add-In vom Typ 'xll' erstellen

       Add-Ins in Arbeitsmappen umwandeln

       Verweise auf Add-Ins in VBA-Projekten

           Suchpfade bei nicht auffindbaren Add-Ins

           Fehlermeldung wenn ein Add-In deaktiviert wird

           Fehlermeldung wenn mehrere Benutzer auf das gleiche Add-In verweisen

       Add-In zusammen mit einer Arbeitsmappe laden/entladen

       Weitere Informationen

 

      Home Zur Hauptseite

To Top

Diese Seite wird momentan stellenweise überarbeitet!

Allgemeines über Add-Ins

Die meisten Benutzer kennen Add-Ins: Es sind kleine Erweiterung der Excel-Arbeitsumgebung, die gewöhnlich zusätzliche Funktionalitäten bereitstellen. Über den Add-In-Manager (Menübefehl Extras/Add-In-Manager) können sie hinzugefügt und entfernt werden.

Doch welche Spezialitäten über Add-Ins sollte man kennen? Welche Probleme und ungewöhnliche Verhaltensweisen können auftreten? Wie erstellt man eigene Add-Ins? Diese und weitere Fragen werden auf dieser Seite beantwortet.

Verwandte Themen

Verwandte Themen

Excel-Funktionen und -Features: Add-Ins

To Top

 


Kurzbeschreibung von Add-Ins

Zuerst die Definition von Microsoft Excel Add-Ins:

Add-In
Add-Ins sind Komponenten, die auf dem Computer installiert werden können, um Microsoft Excel Befehle und Funktionen hinzuzufügen.

Add-Ins sind Programme, mit denen Microsoft Excel optionale Befehle und Funktionen hinzugefügt werden können. Bevor Sie ein Add-In verwenden können, müssen Sie es zunächst auf dem Computer installieren und es dann in Microsoft Excel laden. Add-Ins (Dateien mit der Erweiterung .xla) werden standardmäßig im Ordner "Library" des Microsoft Office-Ordners abgelegt. Durch das Laden eines Add-Ins stehen die entsprechenden Funktionen des Programms in den jeweiligen Menüs von Microsoft Excel zur Verfügung.

Um Speicherplatz zu sparen, sollten Sie selten verwendete Add-Ins wieder aus Microsoft Excel entfernen. Durch das Entfernen eines Add-Ins stehen die jeweiligen Funktionen und Befehle in Microsoft Excel nicht mehr zur Verfügung. Das Add-In-Programm ist jedoch weiterhin auf dem Computer vorhanden, so daß Sie es problemlos erneut laden können.

To Top

 


In Microsoft Excel enthaltene Add-Ins

Microsoft Excel besitzt eine Reihe verschiedener Add-Ins, die Sie installieren können. Die Tabelle zeigt alle Add-Ins von Microsoft Excel 97 (bis auf ein paar Ausnahmen gilt die Auflistung auch für Excel 2000 und Excel 2002).

Add-In Beschreibung
AccessLinks Add-In Erstellt Microsoft Access-Formulare und -Berichte für die Verwendung mit Microsoft Excel-Daten und importiert Microsoft Excel-Daten in Microsoft Access. Das Add-In AccessLinks Add-In kann nur verwendet werden, wenn Microsoft Access 97 auf dem Computer installiert ist.
Analyse-Funktionen Fügt finanzmathematische, statistische und technische Analyse-Funktionen hinzu.
Automatisches Speichern Speichert Arbeitsmappen während der Bearbeitung automatisch in festgelegten Zeitabständen.
Teilsummen-Assistent Erstellt eine Formel, die Daten in einer Liste addiert, sofern die Daten den angegebenen Kriterien entsprechen.
Dateikonvertierungs-Assistent Wandelt eine Gruppe von Dateien in das Microsoft Excel-Arbeitsmappenformat um.
Lookup Wizard Erstellt eine Formel für das Auffinden von Daten in einer Liste unter Verwendung eines anderen bekannten Wertes in der Liste.
ODBC-Add-In Verwendet ODBC-Funktionen, um mit Hilfe von installierten ODBC-Treibern eine Verbindung zu externen Datenquellen herzustellen.
Bericht-Manager Erstellt Berichte, die verschiedene Druckbereiche innerhalb der Arbeitsmappe, benutzerdefinierte Ansichten der Arbeitsmappe und Szenarios enthalten.
Internet-Assistent Wandelt Bereiche von Tabellendaten und Diagrammen in Web-Seiten-Dateien im HTML (Hypertext Markup Language)-Format um.
Solver-Add-In Berechnet Lösungen für Was-wäre-wenn-Szenarios auf der Grundlage von anpassbaren Zellen und Zellen mit Nebenbedingungen.
MS Query Add-In für Kompatibilität mit Excel5 Konvertiert externe Datenbereiche aus dem Microsoft Excel 97-Format in das Format für Microsoft Excel, Version 5.0/95. Ermöglicht den Einsatz von Makros, die in Visual Basic für Applikationen in früheren Versionen von Microsoft Excel erstellt wurden.
Vorlagen-Zubehör Stellt Dienstprogramme zur Verfügung, die von den in Microsoft Excel integrierten Mustervorlagen verwendet werden.
Vorlagen-Assistent mit Datenarchivierung Erstellt Mustervorlagen, die die Einträge in Tabellenblättern in einer Datenbank aufzeichnen, so dass diese zurückverfolgt und analysiert werden können.
Add-In-Verknüpfungen aktualisieren Aktualisiert Verknüpfungen zu integrierten Funktionen von Microsoft Excel 97, bei denen es sich in früheren Versionen von Microsoft Excel um Add-Ins gehandelt hat.
Web-Formular-Assistent Richtet auf einem Web-Server ein Formular ein, so dass Daten, die in das Formular eingegeben werden, einer Datenbank hinzugefügt werden.

To Top

 


Arten von Add-Ins

Aus technischer Sicht gibt es drei verschiedene Arten von Add-Ins für Microsoft Excel, die man an den unterschiedlichen Dateinamenerweiterungen erkennt: xla-, dll- und xll-Add-Ins.

To Top

 

Add-Ins vom Typ 'xla'

Die wohl bekannteste Add-In-Art besitzt die Dateinamenerweiterung "xla". Es handelt sich hier um Add-Ins, die eine spezielle Form einer Arbeitsmappe enthalten.

To Top

 

Add-Ins vom Typ 'dll'

 

To Top

 

Add-Ins vom Typ 'xll'

 

To Top

 


Speicherort von Add-Ins

Bei Microsoft Excel 97 befinden sich die xla-Add-Ins gewöhnlich im Ordner "Library" oder "Makro".

Beispiel:
C:\Programme\Microsoft Office\Office\Library
  oder
C:\Programme\Microsoft Office\Office\Makro

Bei Microsoft Excel 2000 befinden sich die xla-Add-Ins gewöhnlich im Ordner "Addins" eines jeden Benutzers.

Beispiel:
C:\Windows\Profile\<Benutzername>\Anwendungsdaten\Microsoft\Addins

Es ist möglich, dass sich Add-Ins auch im Ordner "Library" befinden. Dieser Ordner wird jedoch nur aus Gründen der Rückwärtskompatibilität verwendet.

To Top

 


Add-In-Namen, die mit einem Unterstrich beginnen

Normalerweise tastet Microsoft Excel die im Registry-Zweig "Init Commands" (sowie auch "Init Menus") abgelegten Einträge nicht an. Es gibt allerdings eine kaum bekannte Ausnahme:

Wenn der Dateiname des Add-Ins mit einem Unterstrich (_) beginnt, so werden beim Beenden von Microsoft Excel die Registry-Einträge unter "Init Commands" und "Init Menus" automatisch entfernt.

Registry-Eintrag im Zweig "HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Excel\Init Commands"
10,&Datei,Als H&TML speichern...,'D:\Programme\Microsoft Office\Office\MAKRO\Html.xla'!DoHTMLCommand,Arbeitsbereich speichern...,,,

On closing the Add-In Manager, Microsoft Excel 95 would normally attempt to add an "Open=" line to the registry so that installed add-ins will be loaded at startup. Microsoft Excel also looks at the InitCommands and InitMenu registry key values to find additional add-ins that need an "Open=" line.

You should not name an add-in with an underscore in Microsoft Excel 97 because it makes an exception to those registry key values beginning with '_'. It ignores those registry key values and does not automatically add an "Open=" line for them. Add-ins that install a InitCommand or InitMenu registry key value with a '_' prefix will not be opened at startup.

To Top

 


Dictator und Committee Add-Ins

Dictator Add-Ins

Dictator add-ins (often called applications) are much easier to test. This is because in a dictator add-in you provide the exact functionality your add-in needs and take away all other options.

Dictator add-ins require a heavy emphasis on Microsoft Excel workspace issues. This involves removing or hiding the standard interface items (menus/toolbars) and replacing them with your own. Before doing this, your dictator add-in should save the current workspace. Your add-in can then implement one or more workspaces for its own use and restore the original workspace when exiting.

Here are the steps you take when your add-in loads:

The following is a list of workspace items that a dictator add-in may need to track:

All of these items must be saved so that they can be restored to their original state when your add-in closes; the only question is where they should be saved. There are two commonly used approaches for saving the workspace. The first involves storing workspace settings in variables. The second involves storing them on a worksheet.

In theory, the advantage of using variables is that it makes workspace operations faster. In practice, the time differential may not be large enough to notice. Using array variables does make it much easier to implement multiple workspaces.

Multiple workspaces are useful when you are displaying several different sheets to the user, each of which needs different settings. For instance, you may have a data entry sheet where you wish to suppress the drag-and-drop function, row and column headers, sheet tabs, scroll bars, and the formula bar. You may then build a schedule sheet and an output table where you want different combinations of these settings. If you store all of these workspace settings in an array during startup, you can quickly switch among them at run time.

Most developers will implement this with a user-defined type structure, as shown below:

Option Explicit

'''    This type structure specifies all of the workspace
'''    settings that are being stored.
Type WORKSPACE_STORAGE
    bRowAndColHeaders As Boolean
    bHorzScrollBar As Boolean
    bVertScrollBar As Boolean
    bSheetTabs As Boolean
    bFormulaBar As Boolean
    bStatusBar As Boolean
    ''' Many more settings follow
End Type

'''    This variable will be used to store the workspace 
'''    settings. Note that it is declared as an array so 
'''    that multiple workspaces can be stored.
Dim muWorkspace() As WORKSPACE_STORAGE

To Top

 

Committee Add-Ins

Committee add-ins work inside Microsoft Excel and fully cooperate with the built-in features and tools provided by Microsoft Excel. They generally add items to menus and/or toolbars and allow the user to continue using all the built-in functionality of Microsoft Excel. Your committee add-in will have to trap for common conflicts that arise during the normal usage of Microsoft Excel. For example, if the user starts your process and happens to be in print preview mode, are you going to beep, display a message, or will an untrapped error occur because you didn't expect to be in this state? The committee add-in has to recover gracefully and provide very strong error handling for both known and unknown error conditions.

At a minimum you need to develop a testing suite that includes some of the more common conflicts that can occur when you're coexisting with Microsoft Excel and other add-ins. All of your entry points (places where the user starts your code via menus, toolbars, keystrokes, and/or events) should contain traps for the most common conflicts. While there's no way to provide for every possible situation that can occur when starting your add-in, you should ask yourself what happens to your code when:

Of course, your error handling may need to be adjusted and/or a test suite developed that tests for as many conditions as possible. As a rule, the committee add-in requires more testing than the dictator add-in because you have less control over the spreadsheet environment. Answering the questions above will reduce the number of conflicts, but the list is not all-inclusive.

The only way to find specific conflicts is with extensive testing. You should consider testing with Standard, Custom, and Run from CD installations. If you're going to skimp on testing, at least test the Standard installation, as this will be the most common installation. If optional Microsoft Excel/Office components are installed, it's possible that some menus will contain more choices than the Standard install.

If you are modifying built-in menus/toolbars, be sure to verify that you are adding and/or removing objects as expected. One of the properties you can specify when adding menus is where your new menu is placed. Rather than blindly using a numerical index to add or delete your menus (and assuming that the user has not customized the existing menus), use the new Microsoft Excel 97 FindControl method to locate an existing menu (called a ControlPopup) before deleting or adding your custom menus.

You may need to have a secondary location as a fallback in case the user has removed or customized the standard menu command bar. Menu customization is easier than ever from the Microsoft Excel interface, and part of your test plan should include non-standard menu and toolbar configurations.

To Top

 


Registry-Schlüssel für Add-Ins

 

 

To Top

 


Eigene Add-Ins erstellen

Add-In vom Typ 'xla' erstellen

Die Erstellung eines eigenen Add-Ins vom Typ 'xla' ist nicht sehr kompliziert.

Excel-Menübefehl Datei/Eigenschaften oder Menübefehl Eigenschaften des Windows Explorers aufrufen, damit das Dialogfenster "Datei-Eigenschaften" erscheint:
- Titel des Dokumentes (d.h. des Add-Ins) eingeben
   -> erscheint dann als Add-In-Name in der Liste sowie als Rahmenbeschriftung im unteren Fensterbereich des Add-In-Managers

Wird kein Titel eingegeben, verwendet Excel im Add-In-Manager den Dateinamen des Add-Ins, wobei Leerzeichen im Namen und die Dateinamenerweiterung ".xla" automatisch entfernt werden.

- Beschreibung des Dokumentes eingeben
   -> erscheint im Rahmenfeld im unteren Fensterbereich des Add-In-Managers

 

VBA-Editor:
- Im Projekt-Explorer den Eintrag VBAProject (<Dateiname>) auswählen
   Im Eigenschaften-Fenster den Standardwert VBAProject der Eigenschaft (Name) umbenennen

- Im Projekt-Explorer das Modul DieseArbeitsmappe auswählen
   Im Eigenschaften-Fenster die Arbeitsmappen-Eigenschaft IsAddIn auf True setzen

Microsoft Excel:
- Menübefehl Datei/Speichern unter aufrufen

   Dateityp "Microsoft Excel-Add-In (*.xla)" auswählen
   In das Verzeichnis "Library" oder "Makros" wechseln

   Dateiname für das Add-In eingeben

 

Dialogfenster "Add-In-Manager"
Abbildung: Add-In-Manager von Microsoft Excel

 

Add-In vom Typ 'dll' erstellen (COM Add-In)

 

 

 

Add-In vom Typ 'xll' erstellen

 

 

To Top

 


Add-Ins in Arbeitsmappen umwandeln

 

 

To Top

 


Verweise auf Add-Ins in VBA-Projekten

Suchpfade bei nicht auffindbaren Add-Ins

Wenn im VBA-Projekt eines Add-Ins ein Verweis auf ein anderes Add-In existiert, sollten Sie beim Ausbreiten des Add-Ins darauf achten, dass das referenzierte Add-In auf der Zielarbeitsstation vorhanden ist, sodass es vom aufrufenden Add-In gefunden wird. Die von Microsoft empfohlene Strategie ist, das referenzierte Add-In im gleichen Ordner wie das aufrufende Add-In zu speichern.

Sobald Sie das VBA-Projekt eines Add-Ins kompilieren, speichert Microsoft Excel den Pfad zum referenzierten Add-In in der Arbeitsmappe mit dem Add-In VBA-Projekt. Wenn Sie das Add-In auf eine andere Arbeitsstation kopieren oder verschieben (z.B. zwecks Ausbreitung und zur Verfügungstellung für andere Benutzer), sucht Excel das referenzierte Add-In im gespeicherten Pfad. Da das Add-In in diesem Fall nicht gefunden werden kann, tritt die nachfolgend beschriebene Situation ein.

Microsoft Excel 97 (Windows) sucht das aufgerufene Add-In in verschiedenen Ordnern in dieser Reihenfolge:

Microsoft Excel 98 (Macintosh) sucht das aufgerufene Add-In nicht.

To Top

 

Fehlermeldung wenn ein Add-In deaktiviert wird

Diese Fehlermeldung erscheint, wenn eine Arbeitsmappe einen Verweis auf ein Add-In (Dateinamenerweiterung "xla") enthält und dann das Add-In über den Add-In-Manager (Menübefehl Extras/Add-In-Manager) entladen werden soll:

Fehlermeldung "Mappe kann nicht geschlossen werden"
Abbildung: Fehlermeldung "Arbeitsmappe kann nicht geschlossen werden"

To Top

 

Fehlermeldung wenn mehrere Benutzer auf das gleiche Add-In verweisen

Because Microsoft Excel 97 automatically opens referenced workbooks and add-ins, you may experience problems if multiple users reference the same copy of a workbook or an add-in. This problem may occur if you create a reference to a workbook or to an add-in stored on a network server, or if you open a workbook that contains this kind of reference.

The first user who creates the reference does not receive an error message. However, all users who subsequently create a reference or open a workbook that contains this kind of reference may receive the following error message:

'<Filename>' is being modified by <First user's name>
Open as Read-Only, or choose Notify to be alerted when it is available.

If you click Cancel in the File Reservation dialog box, you may also receive the following error message:

Can't add a reference to the specified file.

If you use a Visual Basic macro to open the referencing workbook, the previous error message may not appear immediately, and the workbook is opened without any problems. When the error message does appear, click Read-Only or Notify.

If multiple users share the same copy of an add-in, you may want to give each user a copy of the add-in, and then ask each user change the reference to refer to each copy of the add-in. By doing this, you can prevent this problem from occurring.

To Top

 


Add-In zusammen mit einer Arbeitsmappe laden/entladen

Normalerweise wird ein installiertes Add-In beim Excel-Start geladen und beim Beenden von Excel entladen.

Dialogfenster "Add-In-Manager"
Abbildung: Add-In-Manager von Microsoft Excel

 

VBA-Programmcode (im Modul DieseArbeitsmappe eingeben):

Private Sub Workbook_Open()
  AddIns("Muster eines eigenentwickelten Add-Ins").Installed = True
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
  AddIns("Muster eines eigenentwickelten Add-Ins").Installed = False
End Sub

To Top

 


Weitere Informationen

XL97: Referenced Workbooks and Add-Ins Are Automatically Opened
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q167277

XL2002: Add-Ins That Are No Longer Included with Microsoft Excel
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q288118

To Top

Haben Sie Fragen, Anregungen oder Hinweise?
Senden Sie mir ein Mail

Zuletzt aktualisiert am 29.05.2004 / 16:00 Uhr
© 2002-2004 by Philipp von Wartburg, CH-8917 Oberlunkhofen