Office.CoercionType enum
呼び出されたメソッドによって返される、または設定されるデータを強制的に変換する方法を指定します。
注釈
それぞれの CoercionType
アプリケーションとプラットフォームのサポートは、次の要件セットの説明で指定します。
HtmlCoercion、 (使用時
Office.CoercionType.Html
)ImageCoercion 1.1 (使用時
Office.CoercionType.Image
)MatrixCoercion (使用時
Office.CoercionType.Matrix
)OoxmlCoercion (使用時
Office.CoercionType.Ooxml
)TableCoercion (使用時
Office.CoercionType.Table
)TextCoercion (使用時
Office.CoercionType.Text
)ImageCoercion 1.2 (使用時
Office.CoercionType.XmlSvg
)
例
// 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}".`);
}
});
}
フィールド
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Office Add-ins
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示