Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Die Eingabeaufforderungsbibliothek für Office-Add-Ins ist eine Sammlung von Eingabeaufforderungsbeispielen, die sie mit GitHub Copilot verwenden können, wenn Sie Office-Add-Ins entwickeln. GitHub Copilot ist ein KI-Paarprogrammierer, mit dem Sie Code schreiben können. Es ist als Erweiterung für viele Code-Editoren verfügbar, z. B. Visual Studio Code und Visual Studio. Sie können die Erweiterungen direkt über Ihren Code-Editor installieren und starten.
Kopieren Sie die Eingabeaufforderungen aus diesem Artikel, und geben Sie sie in den GitHub Copilot Chat ein, um mit dem Experimentieren zu beginnen. Sie können die Eingabeaufforderungsliste auch in Ihrem Code-Editor öffnen, indem Sie die Datei von GitHub unter Office-Add-Ins-Aufforderungen zur GitHub Copilot auf GitHub herunterladen.
Wichtig
Die Eingabeaufforderungen in diesem Artikel sind so konzipiert, dass sie auf Englisch mit GitHub Copilot funktionieren. Sie wurden getestet, um sicherzustellen, dass Copilot relevante Antworten zurückgibt, aber generative KI kann inhärent variable Antworten zurückgeben. Überprüfen Sie den von GitHub Copilot erstellten Code immer auf Genauigkeit, bevor Sie Ihr Add-In veröffentlichen oder an Benutzer verteilen.
Wir empfehlen Ihnen, Ihre eigenen Aufforderungen zum Entwickeln von Office-Add-Ins mit GitHub Copilot anzupassen. Um Ihre Ideen zu dieser Eingabeaufforderungsbibliothek beizutragen, lesen Sie die Anleitung zum Mitwirken an der Dokumentation zu Office-Add-Ins über GitHub. Sie können Ihre Eingabeaufforderungen und Ihr Feedback auch über die Umfrage unter Feedback zu Office-Add-Ins teilen.
Beispiele für Eingabeaufforderungen
Die folgenden Abschnitte enthalten Eingabeaufforderungen für mehrere Szenarien beim Entwickeln und Veröffentlichen von Add-Ins.
Tipp
Wechseln Sie die Ausdrücke in den Eingabeaufforderungen zwischen Sternchen, um mit verwandten Szenarien zu experimentieren.
Leitfaden für die ersten Schritte
Show me the typical structure of an Office Add-in project and
explain the functionality of each file. Explain the steps and
commands to get started in *Visual Studio Code*.
Erstellen eines Add-In-Projekts
Importieren eines Dokuments als Word Vorlage
Create an Office JavaScript add-in for *Word* to *import a
document as a template*. List the steps to follow in *Visual
Studio Code* to create the add-in and insert code snippets in
the correct files.
Erstellen einer benutzerdefinierten Funktion in Excel
Create an Office JavaScript Add-in for *Excel* to *create a
custom function in Excel*. List the steps to follow in *Visual
Studio Code* to create the add-in and insert code snippets in
the correct files.
Einfügen von Grafiken in eine PowerPoint-Präsentationsfolie
Create an Office JavaScript Add-in for *PowerPoint* to *insert
graphics into a presentation slide*. List the steps to follow in
*Visual Studio Code* to create the add-in and insert code snippets
in the correct files.
Implementieren eines Features für Excel-Add-Ins
Neues Arbeitsblatt hinzufügen
Add a new worksheet *at the end* using the Excel JavaScript API.
Abrufen von Daten aus einer Tabelle
Retrieve the data in the range *A1:B3 on the first worksheet*
using the Excel JavaScript API.
Erstellen eines Diagramms
Insert a line chart titled *"My chart"* into the current worksheet
using the data *in the range A1:B3* using the Excel JavaScript API.
Erstellen einer benutzerdefinierten Funktion zum Ausführen von Berechnungen in Excel
Create a JavaScript custom function in Excel that conducts a
calculation.
Behandeln eines Ereignisses
Handle an event *when selection changes in worksheet* using
Excel JavaScript API.
Erstellen von Shapes
Create *a yellow square* shape in the worksheet using the Excel
JavaScript API.
Einfügen einer Kopie der vorhandenen Arbeitsmappe in die aktuelle
Insert a workbook template as Base64 in the current workbook using
insertWorksheetsFromBase64 Excel JavaScript API.
Implementieren eines Features für Word Add-Ins
Einfügen eines Absatzes
Insert a paragraph with the content *"My paragraph"* at the start
of the document using the Word JavaScript API.
Anwenden einer Formatvorlage auf einen Absatz
Apply the style *"Heading1"* to the first paragraph in the document
using the Word JavaScript API.
Ändern der Schriftart
Change the font formatting of *the selected document text* using
the Word JavaScript API.
Einfügen einer Tabelle in ein Dokument
Insert a table named *"Sample table"* with sample data in the
document using the Word JavaScript API.
Einfügen eines Inhaltssteuerelements
Insert a content control labeled *"Sample Content Control"* into the
first paragraph and *set the content control's color to red* using
the Word JavaScript API.
Kommentar hinzufügen
Insert a comment into the document selection using the Word JavaScript API
Einfügen eines Dokuments in das Zieldokument an einer bestimmten Stelle
Import a file from local storage as a template to the current
document using the Word JavaScript insertFileFromBase64 API.
Implementieren eines Features für Excel-, PowerPoint- oder Word-Add-Ins
Dialogfeld hinzufügen
Show a dialog in the application *when a user clicks a button
in the add-in* using the Office JavaScript API.
Abrufen eines Zugriffstokens
Get an access token in an Office Add-in using the Office
JavaScript API to authenticate the user with external services
or APIs.
Leitfaden zum Veröffentlichen von Add-Ins
Verteilen eines Add-Ins an eine organization
Tell me how to deploy and distribute the local Office JavaScript
add-in code to *all employees in my organization* after
development. Provide the steps to follow.
Verteilen eines Add-Ins an den Add-In-Store
Tell me how to deploy and distribute the local Office JavaScript
add-in code to the *add-in store* after development. Provide the
steps to follow.
Siehe auch
Office Add-ins