this answerが提案したように、私は少しoffice.js
を修正したいと思います。ローカルoffice.jsを読み込めません
https://appsforoffice.microsoft.com/lib/1/hosted/office.js
のコンテンツをローカルにコピーしました。その結果、https://localhost:3000/static/office.js
は内容が良好です。
はその後、私は非常に単純なファイルtest.html
ます
<html>
<head>
<!--<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>-->
<script type="text/javascript" src="https://localhost:3000/static/office.js"></script>
</head>
<body>
haha
</body>
</html>
ロードhttps://localhost:3000/static/test.html
リモートoffice.js
とブラウザでWarning: Office.js is loaded outside of Office client o15apptofilemappingtable.js:11
を示し、およびアドインがうまく機能オフィスでそれをロードします。
ただし、ブラウザでローカルoffice.js
を使用してhttps://localhost:3000/static/test.html
をロードすると、Uncaught SyntaxError: Unexpected token < o15apptofilemappingtable.js:1
が表示され、Officeアドインでロードすると、エラーAdd-in Error Something went wrong and we couldn't start this add-in. Please try again later or contact your system administrator
が返されます。
だから、誰が何が間違っているのか分かりますか?私たちのローカルバージョンoffice.js
を作ることは可能ですか?