Office.CoercionType enum
Gibt an, wie Daten umgewandelt werden sollen, die von der aufgerufenen Methode zurückgegeben oder festgelegt wurden.
Hinweise
Die Anwendungs- und Plattformunterstützung für jede CoercionType
wird in den folgenden Beschreibungen des Anforderungssatzes angegeben.
HtmlCoercion, (bei Verwendung von
Office.CoercionType.Html
)ImageCoercion 1.1 (bei Verwendung von
Office.CoercionType.Image
)MatrixCoercion (bei Verwendung von
Office.CoercionType.Matrix
)OoxmlCoercion (bei Verwendung von
Office.CoercionType.Ooxml
)TableCoercion (bei Verwendung von
Office.CoercionType.Table
)TextCoercion (bei Verwendung von
Office.CoercionType.Text
)ImageCoercion 1.2 (bei Verwendung von
Office.CoercionType.XmlSvg
)
Beispiele
// This function displays the currently selected text in the console.
// It uses the Common APIs.
function run() {
Office.context.document.getSelectedDataAsync(Office.CoercionType.Text, (asyncResult) => {
if (asyncResult.status === Office.AsyncResultStatus.Failed) {
console.error(asyncResult.error.message);
} else {
console.log(`The selected data is "${asyncResult.value}".`);
}
});
}
Felder
Office Add-ins
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für