{"id":2940,"date":"2013-04-24T10:53:30","date_gmt":"2013-04-24T01:53:30","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=2940"},"modified":"2013-04-24T17:40:48","modified_gmt":"2013-04-24T08:40:48","slug":"office%e7%94%a8%e3%82%a2%e3%83%97%e3%83%aaexcel-services-ecmascript%e3%81%a8%e3%81%ae%e9%80%a3%e6%90%ba","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=2940","title":{"rendered":"[Office\u7528\u30a2\u30d7\u30ea]Excel Services ECMAScript\u3068\u306e\u9023\u643a"},"content":{"rendered":"<p>\u300c<a href=\"\/\/www.ka-net.org\/blog\/?p=2674\" title=\"[Office\u7528\u30a2\u30d7\u30ea]\u30ab\u30ec\u30f3\u30c0\u30fc\u304b\u3089\u65e5\u4ed8\u5165\u529b\" target=\"_blank\">[Office\u7528\u30a2\u30d7\u30ea]\u30ab\u30ec\u30f3\u30c0\u30fc\u304b\u3089\u65e5\u4ed8\u5165\u529b<\/a>\u300d\u3067\u3082\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u30b3\u30f3\u30c6\u30f3\u30c4\u30a2\u30d7\u30ea\u3092\u633f\u5165\u3057\u305f\u30d6\u30c3\u30af\u3092Web\u30da\u30fc\u30b8\u306b\u57cb\u3081\u8fbc\u3080\u3053\u3068\u3067\u3001\u30d6\u30e9\u30a6\u30b6\u30fc\u4e0a\u3067Office\u7528\u30a2\u30d7\u30ea\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059(Excel Web App\u7d4c\u7531)\u3002<\/p>\n<p>\u5148\u65e5\u767b\u58c7\u3057\u305f<a href=\"\/\/www.ka-net.org\/blog\/?p=2907\" title=\"[Office\u7528\u30a2\u30d7\u30ea]\u7b2c\u4e00\u56de Apps for Office \u52c9\u5f37\u4f1a\u3067\u767b\u58c7\u3057\u307e\u3057\u305f\u3002\" target=\"_blank\">\u7b2c\u4e00\u56de Apps for Office \u52c9\u5f37\u4f1a<\/a>\u306e\u4e2d\u3067\u5c0f\u30cd\u30bf\u3068\u3057\u305f\u7d39\u4ecb\u3057\u305f\u306e\u3067\u3059\u304c\u3001Web\u30da\u30fc\u30b8\u306b\u57cb\u3081\u8fbc\u3093\u3060\u30d6\u30c3\u30af\u306f<strong>Excel Services ECMAScript<\/strong>(Excel Services JavaScript API)\u3067\u64cd\u4f5c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001<\/p>\n<p><span style=\"color: #ff0000; font-weight: bold;\">JavaScript\u3067\u30bb\u30eb\u306b\u5024\u3092\u66f8\u304d\u8fbc\u307f \u2192 \u5024\u3092\u8aad\u307f\u8fbc\u3093\u3067Office\u7528\u30a2\u30d7\u30ea\u52d5\u4f5c<\/span><\/p>\n<p>\u3068\u3044\u3063\u305f\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><!--more--><br \/>\n<script src=\"https:\/\/ajax.aspnetcdn.com\/ajax\/jquery\/jquery-1.9.1.min.js\"><\/script><br \/>\n<script src=\"http:\/\/excel.officeapps.live.com\/x\/_layouts\/ExcelJs.ashx?v=1\"><\/script><br \/>\n<script>\n        var fileToken = \"SD92A165759188B352!521\/-7880906317294423214\/\";<\/p>\n<p>        if (window.attachEvent) {\n            window.attachEvent(\"onload\", loadEwaOnPageLoad);\n        } else {\n            window.addEventListener(\"DOMContentLoaded\", loadEwaOnPageLoad, false);\n        }<\/p>\n<p>        function loadEwaOnPageLoad() {\n            var props = {\n                uiOptions: {\n                    showDownloadButton: false,\n                    showParametersTaskPane: false,\n                    selectedCell: \"'Sheet1'!C1\"\n                },\n                interactivityOptions: {\n                    allowTypingAndFormulaEntry: true,\n                    allowParameterModification: false,\n                    allowSorting: false,\n                    allowFiltering: false,\n                    allowPivotTableInteractivity: false\n                }\n            };\n            Ewa.EwaControl.loadEwaAsync(fileToken, \"myExcelDiv\", props, onEwaLoaded);\n        }<\/p>\n<p>        function onEwaLoaded(result) {\n             ewa = Ewa.EwaControl.getInstances().getItem(0);\n        }<\/p>\n<p>        function setRangeValue(asyncResult) {\n            if (asyncResult.getCode() != 0) {\n                alert(\"Err:\" + asyncResult.getDescription());\n            }\n        }<\/p>\n<p>        $(function() {\n            $(\"#txtInput\").change(function() {\n                \/\/alert($(this).val());\n                var ary = new Array();\n                ary[0] = new Array();\n                ary[0][0] = $(this).val();\n                ewa.getActiveWorkbook().getActiveCell().setValuesAsync(ary,setRangeValue,null);\n            });\n        });\n<\/script><br \/>\n<input id=\"txtInput\" type=\"text\" value=\"\" style=\"font-size:24pt;\"><\/p>\n<div id=\"myExcelDiv\" style=\"width: 500px; height: 500px\"><\/div>\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;script src=&quot;https:\/\/ajax.aspnetcdn.com\/ajax\/jquery\/jquery-1.9.1.min.js&quot;&gt;&lt;\/script&gt;\r\n        &lt;script src=&quot;http:\/\/excel.officeapps.live.com\/x\/_layouts\/ExcelJs.ashx?v=1&quot;&gt;&lt;\/script&gt;\r\n        &lt;script&gt;\r\n        var fileToken = &quot;SD92A165759188B352!521\/-7880906317294423214\/&quot;;\r\n        \r\n        if (window.attachEvent) {\r\n            window.attachEvent(&quot;onload&quot;, loadEwaOnPageLoad);\r\n        } else {\r\n            window.addEventListener(&quot;DOMContentLoaded&quot;, loadEwaOnPageLoad, false);\r\n        }\r\n        \r\n        function loadEwaOnPageLoad() {\r\n            var props = {\r\n                uiOptions: {\r\n                    showDownloadButton: false,\r\n                    showParametersTaskPane: false,\r\n                    selectedCell: &quot;'Sheet1'!C1&quot;\r\n                },\r\n                interactivityOptions: {\r\n                    allowTypingAndFormulaEntry: true,\r\n                    allowParameterModification: false,\r\n                    allowSorting: false,\r\n                    allowFiltering: false,\r\n                    allowPivotTableInteractivity: false\r\n                }\r\n            };\r\n            Ewa.EwaControl.loadEwaAsync(fileToken, &quot;myExcelDiv&quot;, props, onEwaLoaded);\r\n        }\r\n\r\n        function onEwaLoaded(result) {\r\n             ewa = Ewa.EwaControl.getInstances().getItem(0);\r\n        }\r\n        \r\n        function setRangeValue(asyncResult) {\r\n            if (asyncResult.getCode() != 0) {\r\n                alert(&quot;Err:&quot; + asyncResult.getDescription());\r\n            }\r\n        }\r\n        \r\n        $(function() {\r\n            $(&quot;#txtInput&quot;).change(function() {\r\n                \/\/alert($(this).val());\r\n                var ary = new Array();\r\n                ary&#x5B;0] = new Array();\r\n                ary&#x5B;0]&#x5B;0] = $(this).val();\r\n                ewa.getActiveWorkbook().getActiveCell().setValuesAsync(ary,setRangeValue,null);\r\n            });\r\n        });\r\n        &lt;\/script&gt;\r\n    &lt;\/head&gt;\r\n    &lt;body&gt;\r\n            &lt;input id=&quot;txtInput&quot; type=&quot;text&quot; value=&quot;&quot; style=&quot;font-size:24pt;&quot;&gt;&lt;br&gt;&lt;br&gt;\r\n            &lt;div id=&quot;myExcelDiv&quot; style=&quot;width: 500px; height: 500px&quot;&gt;&lt;\/div&gt;\r\n    &lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u3067\u306f\u30a4\u30f3\u30d7\u30c3\u30c8\u30dc\u30c3\u30af\u30b9\u306b\u5165\u529b\u3057\u305f\u5024\u3092\u30d6\u30c3\u30af\u4e0a\u306e\u30bb\u30eb\u306b\u66f8\u304d\u8fbc\u307f\u3001\u305d\u308c\u306b\u5408\u308f\u305b\u3066\u30a2\u30d7\u30ea\u304c\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002Office\u7528\u30a2\u30d7\u30ea\u3068Excel Services ECMAScript\u306e\u9023\u643a\u306f\u5de5\u592b\u6b21\u7b2c\u3067\u8272\u3005\u904a\u3079\u307e\u3059\u306e\u3067\u3001\u8208\u5473\u304c\u3042\u308b\u65b9\u306f\u662f\u975e\u304a\u8a66\u3057\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u30d6\u30c3\u30af\u306e\u57cb\u3081\u8fbc\u307f\u65b9\u6cd5\u3084Excel Services ECMAScript\u306e\u51e6\u7406\u306b\u3064\u3044\u3066\u306f\u5f53\u30d6\u30ed\u30b0\u306e<a href=\"\/\/www.ka-net.org\/blog\/?cat=41\" title=\"Excel Services ECMAScript\" target=\"_blank\">Excel Services ECMAScript\u30ab\u30c6\u30b4\u30ea\u30fc<\/a>\u3067\u7d39\u4ecb\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u305d\u3061\u3089\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u300c[Office\u7528\u30a2\u30d7\u30ea]\u30ab\u30ec\u30f3\u30c0\u30fc\u304b\u3089\u65e5\u4ed8\u5165\u529b\u300d\u3067\u3082\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u30b3\u30f3\u30c6\u30f3\u30c4\u30a2\u30d7\u30ea\u3092\u633f\u5165\u3057\u305f\u30d6\u30c3\u30af\u3092Web\u30da\u30fc\u30b8\u306b\u57cb\u3081\u8fbc\u3080\u3053\u3068\u3067\u3001\u30d6\u30e9\u30a6\u30b6\u30fc\u4e0a\u3067Office\u7528\u30a2\u30d7\u30ea\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059(Excel Web Ap [&hellip;]","protected":false},"author":1,"featured_media":7111,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[130,4,79,41],"tags":[77,107],"class_list":["post-2940","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apps-for-office","category-office","category-office2013","category-excel-services-ecmascript","tag-apps-for-office","tag-excel-services-javascript-api"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Excel.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-Lq","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2940","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=2940"}],"version-history":[{"count":17,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2940\/revisions"}],"predecessor-version":[{"id":2956,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2940\/revisions\/2956"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7111"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2940"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2940"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}