{"id":10440,"date":"2018-05-28T15:00:56","date_gmt":"2018-05-28T06:00:56","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=10440"},"modified":"2018-05-28T15:27:56","modified_gmt":"2018-05-28T06:27:56","slug":"office%e3%82%a2%e3%83%89%e3%82%a4%e3%83%b3%e3%82%b7%e3%83%bc%e3%83%88%e8%a6%8b%e5%87%ba%e3%81%97%e3%81%ae%e8%89%b2%e3%82%92%e5%a4%89%e6%9b%b4%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=10440","title":{"rendered":"[Office\u30a2\u30c9\u30a4\u30f3]\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u3092\u5909\u66f4\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><a href=\"https:\/\/www.ka-net.org\/blog\/?p=10437\" title=\"[Office\u30a2\u30c9\u30a4\u30f3]Excel JavaScript API 1.7\u304cGA\u306b\u306a\u308a\u307e\u3057\u305f\u3002 | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">\u524d\u56de\u306e\u8a18\u4e8b<\/a>\u3067\u7d39\u4ecb\u3057\u305f<a href=\"https:\/\/dev.office.com\/reference\/add-ins\/excel\/excel-add-ins-reference-overview\" title=\"Excel - Docs - Office Dev Center\" target=\"_blank\">Excel JavaScript API \u30d0\u30fc\u30b8\u30e7\u30f31.7<\/a>\u3067\u3001\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u304c\u53d6\u5f97\u30fb\u5909\u66f4\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h4 class=\"style4a\">\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb(manifest.xml)<\/h4>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\r\n&lt;OfficeApp xmlns=&quot;http:\/\/schemas.microsoft.com\/office\/appforoffice\/1.1&quot; xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:type=&quot;TaskPaneApp&quot;&gt;\r\n  &lt;Id&gt;5948f3e3-6c14-4260-99bd-02933fd017cd&lt;\/Id&gt;\r\n  &lt;Version&gt;1.0&lt;\/Version&gt;\r\n  &lt;ProviderName&gt;@kinuasa&lt;\/ProviderName&gt;\r\n  &lt;DefaultLocale&gt;ja-jp&lt;\/DefaultLocale&gt;\r\n  &lt;DisplayName DefaultValue=&quot;Sample - Excel JavaScript API  1.7&quot; \/&gt;\r\n  &lt;Description DefaultValue=&quot;Sample - Excel JavaScript API  1.7&quot;\/&gt;\r\n  &lt;Hosts&gt;\r\n    &lt;Host Name=&quot;Workbook&quot; \/&gt;\r\n  &lt;\/Hosts&gt;\r\n  &lt;DefaultSettings&gt;\r\n    &lt;SourceLocation DefaultValue=&quot;https:\/\/localhost\/apps\/test0528\/index.html&quot; \/&gt;\r\n  &lt;\/DefaultSettings&gt;\r\n  &lt;Permissions&gt;ReadWriteDocument&lt;\/Permissions&gt;\r\n&lt;\/OfficeApp&gt;<\/pre>\n<h4 class=\"style4a\">\u30a2\u30c9\u30a4\u30f3\u672c\u4f53(index.html)<\/h4>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n  &lt;head&gt;\r\n    &lt;meta charset=&quot;UTF-8&quot;&gt;\r\n    &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=Edge&quot;&gt;\r\n    &lt;title&gt;Sample&lt;\/title&gt;\r\n    &lt;link rel=&quot;stylesheet&quot; href=&quot;https:\/\/static2.sharepointonline.com\/files\/fabric\/office-ui-fabric-js\/1.4.0\/css\/fabric.components.min.css&quot;&gt;\r\n    &lt;style&gt;\r\n      #content-main {\r\n        background: #ffffff;\r\n        position: fixed;\r\n        top: 100px;\r\n        left: 0;\r\n        right: 0;\r\n        bottom: 0;\r\n        overflow: auto;\r\n      }\r\n    &lt;\/style&gt;\r\n    &lt;script src=&quot;https:\/\/ajax.aspnetcdn.com\/ajax\/jquery\/jquery-3.3.1.min.js&quot;&gt;&lt;\/script&gt;\r\n    &lt;script src=&quot;https:\/\/appsforoffice.microsoft.com\/lib\/1\/hosted\/office.js&quot;&gt;&lt;\/script&gt;\r\n    &lt;!-- &lt;script src=&quot;https:\/\/appsforoffice.microsoft.com\/lib\/beta\/hosted\/office.js&quot;&gt;&lt;\/script&gt; --&gt;\r\n    &lt;script src=&quot;https:\/\/unpkg.com\/core-js\/client\/core.min.js&quot;&gt;&lt;\/script&gt;\r\n    &lt;script src=&quot;https:\/\/unpkg.com\/@microsoft\/office-js-helpers@0.7.4\/dist\/office.helpers.min.js&quot;&gt;&lt;\/script&gt;\r\n    &lt;script src=&quot;https:\/\/static2.sharepointonline.com\/files\/fabric\/office-ui-fabric-js\/1.4.0\/js\/fabric.min.js&quot;&gt;&lt;\/script&gt;\r\n    &lt;script&gt;\r\n      Office.initialize = function(reason){\r\n        $(document).ready(function(){\r\n          $(&quot;#btn1&quot;).click(getTabColor);\r\n          $(&quot;#btn2&quot;).click(setTabColor);\r\n          $(&quot;#btn3&quot;).click(resetTabColor);\r\n        });\r\n      };\r\n      \r\n      \/\/\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u53d6\u5f97\r\n      function getTabColor(){\r\n        Excel.run(function(context){\r\n          var sht = context.workbook.worksheets.getActiveWorksheet();\r\n          sht.load(&quot;tabColor&quot;);\r\n          return context.sync().then(function(){\r\n            OfficeHelpers.UI.notify(&quot;&quot;, &quot;\u30bf\u30d6\u306e\u8272\uff1a&quot; + sht.tabColor, &quot;success&quot;);\r\n          });\r\n        }).catch(function(error){\r\n          OfficeHelpers.UI.notify(error);\r\n        });\r\n      }\r\n      \r\n      \/\/\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u3092\u9752\u306b\u8a2d\u5b9a\r\n      function setTabColor(){\r\n        Excel.run(function(context){\r\n          var sht = context.workbook.worksheets.getActiveWorksheet();\r\n          sht.tabColor = &quot;#0000FF&quot;;\r\n          return context.sync().then(function(){\r\n            OfficeHelpers.UI.notify(&quot;&quot;, &quot;\u51e6\u7406\u6210\u529f&quot;, &quot;success&quot;);\r\n          });\r\n        }).catch(function(error){\r\n          OfficeHelpers.UI.notify(error);\r\n        });\r\n      }\r\n      \r\n      \/\/\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u3092\u521d\u671f\u5316\r\n      function resetTabColor(){\r\n        Excel.run(function(context){\r\n          var sht = context.workbook.worksheets.getActiveWorksheet();\r\n          sht.tabColor = &quot;&quot;;\r\n          return context.sync().then(function(){\r\n            OfficeHelpers.UI.notify(&quot;&quot;, &quot;\u51e6\u7406\u6210\u529f&quot;, &quot;success&quot;);\r\n          });\r\n        }).catch(function(error){\r\n          OfficeHelpers.UI.notify(error);\r\n        });\r\n      }\r\n    &lt;\/script&gt;\r\n  &lt;\/head&gt;\r\n  &lt;body&gt;\r\n    &lt;div id=&quot;content-main&quot;&gt;\r\n      &lt;button id=&quot;btn1&quot; class=&quot;ms-Button&quot;&gt;\r\n        &lt;span class=&quot;ms-Button-label&quot;&gt;Get TabColor&lt;\/span&gt;\r\n      &lt;\/button&gt;\r\n      &lt;button id=&quot;btn2&quot; class=&quot;ms-Button&quot;&gt;\r\n        &lt;span class=&quot;ms-Button-label&quot;&gt;Set TabColor&lt;\/span&gt;\r\n      &lt;\/button&gt;\r\n      &lt;button id=&quot;btn3&quot; class=&quot;ms-Button&quot;&gt;\r\n        &lt;span class=&quot;ms-Button-label&quot;&gt;Reset TabColor&lt;\/span&gt;\r\n      &lt;\/button&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p><a href=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/ExcelJavaScriptAPI_Worksheet_tabColor_01.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/ExcelJavaScriptAPI_Worksheet_tabColor_01.gif\" alt=\"\" width=\"658\" height=\"583\" class=\"alignnone size-full wp-image-10441\" \/><\/a><\/p>\n<p><a href=\"https:\/\/dev.office.com\/reference\/add-ins\/excel\/worksheet\" title=\"Worksheet - Docs - Office Dev Center\" target=\"_blank\">Worksheet\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306etabColor\u30d7\u30ed\u30d1\u30c6\u30a3<\/a>\u3067\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u306e\u53d6\u5f97\u30fb\u5909\u66f4\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u3067\u306f\u300116\u9032\u6570\u3067\u8272\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u300cBlue\u300d\u3084\u300cAqua\u300d\u3068\u3044\u3063\u305f\u8272\u540d\u79f0\u3067\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<div id=\"single_banner_area2\" class=\"clearfix one_banner\">\n<div class=\"single_banner single_banner_left\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u8a18\u4e8b\u4e2d(\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u5e83\u544a\u30e6\u30cb\u30c3\u30c8) -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-7306936664602087\"\r\n     data-ad-slot=\"5429724765\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<div class=\"single_banner single_banner_right\">\n<a href=\"\" target=\"_blank\"><img decoding=\"async\" src=\"\" alt=\"\" title=\"\" \/><\/a>\n<\/div>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"\u524d\u56de\u306e\u8a18\u4e8b\u3067\u7d39\u4ecb\u3057\u305fExcel JavaScript API \u30d0\u30fc\u30b8\u30e7\u30f31.7\u3067\u3001\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u304c\u53d6\u5f97\u30fb\u5909\u66f4\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb(manifest.xml) &lt;?xml version= [&hellip;]","protected":false},"author":1,"featured_media":7119,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"[[Office\u30a2\u30c9\u30a4\u30f3]\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u3092\u5909\u66f4\u3059\u308b\u65b9\u6cd5]","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[130],"tags":[],"class_list":["post-10440","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apps-for-office"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-OfficeAddins.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-2Io","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10440"}],"version-history":[{"count":2,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10440\/revisions"}],"predecessor-version":[{"id":10443,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10440\/revisions\/10443"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7119"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}