{"id":12698,"date":"2020-05-01T12:00:17","date_gmt":"2020-05-01T03:00:17","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=12698"},"modified":"2020-09-03T16:00:29","modified_gmt":"2020-09-03T07:00:29","slug":"office-scripts%e6%8a%bc%e3%81%95%e3%81%88%e3%81%a6%e3%81%8a%e3%81%8d%e3%81%9f%e3%81%84%e5%9f%ba%e6%9c%ac%e7%9a%84%e3%81%aa%e3%83%9d%e3%82%a4%e3%83%b3%e3%83%88","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=12698","title":{"rendered":"[Office Scripts]\u62bc\u3055\u3048\u3066\u304a\u304d\u305f\u3044\u57fa\u672c\u7684\u306a\u30dd\u30a4\u30f3\u30c8"},"content":{"rendered":"<p>Office Scripts\u3067\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u306b\u3042\u305f\u308a\u3001\u30cf\u30de\u308a\u305d\u3046\u306a\u30dd\u30a4\u30f3\u30c8\u304c\u3044\u304f\u3064\u304b\u3042\u308b\u306e\u3067\u3001\u4eca\u56de\u306f\u305d\u308c\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h4 class=\"style4a\">main\u95a2\u6570\u304c\u5fc5\u8981<\/h4>\n<p>Office Scripts\u3067\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u300c<span style=\"color: #ff0000; font-weight: bold;\">main<\/span>\u300d\u95a2\u6570\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">function main(workbook: ExcelScript.Workbook) {\r\n  \/\/ Your code here\r\n}<\/pre>\n<p>\u3053\u306e\u95a2\u6570\u540d\u3092\u5909\u66f4\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">Maximum call stack size exceeded<\/pre>\n<p><a href=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/OfficeScripts_fundamentals_04.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/OfficeScripts_fundamentals_04.jpg\" alt=\"\" width=\"392\" height=\"343\" class=\"alignnone size-full wp-image-12909\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/OfficeScripts_fundamentals_04.jpg 392w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/OfficeScripts_fundamentals_04-300x263.jpg 300w\" sizes=\"auto, (max-width: 392px) 100vw, 392px\" \/><\/a><\/p>\n<h4 class=\"style4a\">\u5f93\u6765\u306e\u975e\u540c\u671f\u30b9\u30af\u30ea\u30d7\u30c8<\/h4>\n<p>\u53e4\u3044\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306bmain\u95a2\u6570\u304c\u975e\u540c\u671fAPI\u30e2\u30c7\u30eb\u3067\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">async function main(context: Excel.RequestContext) {\r\n  let rng = context.workbook.getActiveCell();\r\n  rng.load(&quot;values&quot;); \/\/values\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8aad\u307f\u8fbc\u307f\r\n  await context.sync(); \/\/\u540c\u671f\u5b9f\u884c\r\n  console.log(rng.values&#x5B;0]&#x5B;0]);\r\n}<\/pre>\n<p>\u73fe\u5728\u306eAPI\u30e2\u30c7\u30eb\u3067\u306fload\u3084sync\u3068\u3044\u3063\u305f\u51e6\u7406\u304c\u4e0d\u8981\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u3053\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u306f\u3001\u4e0b\u8a18\u30b5\u30a4\u30c8\u3092\u53c2\u8003\u306b\u3001\u65b0\u3057\u3044\u30e2\u30c7\u30eb\u306b\u5909\u63db\u3057\u305f\u65b9\u304c\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<div class=\"linkcard\"><div class=\"lkc-external-wrap\"><a class=\"lkc-link no_icon\" href=\"https:\/\/docs.microsoft.com\/ja-jp\/office\/dev\/scripts\/develop\/excel-async-model?WT.mc_id=M365-MVP-4029057\" target=\"_blank\" rel=\"external nofollow noopener\"><div class=\"lkc-card\"><div class=\"lkc-info\"><div class=\"lkc-favicon\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.google.com\/s2\/favicons?domain=docs.microsoft.com\" alt=\"\" width=\"16\" height=\"16\" \/><\/div><div class=\"lkc-domain\">docs.microsoft.com<\/div><\/div><div class=\"lkc-content\"><figure class=\"lkc-thumbnail\"><img decoding=\"async\" class=\"lkc-thumbnail-img\" src=\"https:\/\/s.wordpress.com\/mshots\/v1\/https%3A%2F%2Fdocs.microsoft.com%2Fja-jp%2Foffice%2Fdev%2Fscripts%2Fdevelop%2Fexcel-async-model%3FWT.mc_id%3DM365-MVP-4029057?w=100\" width=\"100px\" height=\"108px\" alt=\"\" \/><\/figure><div class=\"lkc-title\">\u975e\u540c\u671f Api \u3092\u4f7f\u7528\u3059\u308b\u53e4\u3044 Office \u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b - Office Scripts<\/div><div class=\"lkc-url\" title=\"https:\/\/docs.microsoft.com\/ja-jp\/office\/dev\/scripts\/develop\/excel-async-model?WT.mc_id=M365-MVP-4029057\">https:\/\/docs.microsoft.com\/ja-jp\/office\/dev\/scripts\/develop\/excel-async-model?WT.mc_id=M365-MVP-4029057<\/div><div class=\"lkc-excerpt\">Office \u30b9\u30af\u30ea\u30d7\u30c8\u975e\u540c\u671f Api \u306e\u5165\u9580\u3068\u3001\u53e4\u3044\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30ed\u30fc\u30c9\/\u540c\u671f\u30d1\u30bf\u30fc\u30f3\u306e\u4f7f\u7528\u65b9\u6cd5\u3002<\/div><\/div><div class=\"clear\"><\/div><\/div><\/a><\/div><\/div>\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<p>\u4e0a\u3067\u7d39\u4ecb\u3057\u305fOffice Scripts\u306e\u57fa\u672c\u7684\u306a\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u4e0b\u8a18\u30b5\u30a4\u30c8\u3067\u8a73\u7d30\u306b\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u524d\u306b\u662f\u975e\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"linkcard\"><div class=\"lkc-external-wrap\"><a class=\"lkc-link no_icon\" href=\"https:\/\/docs.microsoft.com\/ja-jp\/office\/dev\/scripts\/develop\/scripting-fundamentals?WT.mc_id=M365-MVP-4029057\" target=\"_blank\" rel=\"external nofollow noopener\"><div class=\"lkc-card\"><div class=\"lkc-info\"><div class=\"lkc-favicon\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.google.com\/s2\/favicons?domain=docs.microsoft.com\" alt=\"\" width=\"16\" height=\"16\" \/><\/div><div class=\"lkc-domain\">docs.microsoft.com<\/div><\/div><div class=\"lkc-content\"><figure class=\"lkc-thumbnail\"><img decoding=\"async\" class=\"lkc-thumbnail-img\" src=\"https:\/\/s.wordpress.com\/mshots\/v1\/https%3A%2F%2Fdocs.microsoft.com%2Fja-jp%2Foffice%2Fdev%2Fscripts%2Fdevelop%2Fscripting-fundamentals%3FWT.mc_id%3DM365-MVP-4029057?w=100\" width=\"100px\" height=\"108px\" alt=\"\" \/><\/figure><div class=\"lkc-title\">Excel on the web \u3067\u306e Office \u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u57fa\u672c\u4e8b\u9805 - Office Scripts<\/div><div class=\"lkc-url\" title=\"https:\/\/docs.microsoft.com\/ja-jp\/office\/dev\/scripts\/develop\/scripting-fundamentals?WT.mc_id=M365-MVP-4029057\">https:\/\/docs.microsoft.com\/ja-jp\/office\/dev\/scripts\/develop\/scripting-fundamentals?WT.mc_id=M365-MVP-4029057<\/div><div class=\"lkc-excerpt\">Office \u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3059\u308b\u524d\u306b\u7406\u89e3\u3057\u3066\u304a\u304f\u3079\u304d\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 \u30e2\u30c7\u30eb\u306e\u60c5\u5831\u3068\u4ed6\u306e\u57fa\u672c\u4e8b\u9805\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/div><\/div><div class=\"clear\"><\/div><\/div><\/a><\/div><\/div>\n<h4 class=\"style4a\">\u95a2\u9023\u8a18\u4e8b<\/h4>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=12733\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-OfficeScripts-120x120.jpg' alt='Office Scripts(Office \u30b9\u30af\u30ea\u30d7\u30c8)\u306e\u8a18\u4e8b\u307e\u3068\u3081' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2020.05.03<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=12733\">Office Scripts(Office \u30b9\u30af\u30ea\u30d7\u30c8)\u306e\u8a18\u4e8b\u307e\u3068\u3081 <\/a><\/div><div class=\"cardlink_excerpt\">\u5f53\u30d6\u30ed\u30b0\u306e\u300cOffice Scripts\u300d\u95a2\u9023\u306e\u8a18\u4e8b\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002\r\n\r\n\r\nOffice Scripts\u306e\u57fa\u672c\r\n\u30bb\u30eb\u64cd\u4f5c\r\n\u30b7\u30fc\u30c8\u64cd\u4f5c\r\n\u56f3\u5f62\u30fb\u753b\u50cf\u64cd\u4f5c\r\n\u30c6\u30fc\u30d6\u30eb\u64cd\u4f5c\r\n\u30b0\u30e9\u30d5\u64cd\u4f5c\r\nPower Automate\u9023\u643a\r\n\u305d\u306e\u4ed6\r\n\r\n\r\n\r\n\r\nO...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"Office Scripts\u3067\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u306b\u3042\u305f\u308a\u3001\u30cf\u30de\u308a\u305d\u3046\u306a\u30dd\u30a4\u30f3\u30c8\u304c\u3044\u304f\u3064\u304b\u3042\u308b\u306e\u3067\u3001\u4eca\u56de\u306f\u305d\u308c\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002 main\u95a2\u6570\u304c\u5fc5\u8981 Office Scripts\u3067\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u300cmain\u300d\u95a2\u6570\u304c\u5fc5\u8981\u3067\u3059\u3002 fu [&hellip;]","protected":false},"author":1,"featured_media":12699,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"[[Office Scripts]\u62bc\u3055\u3048\u3066\u304a\u304d\u305f\u3044\u57fa\u672c\u7684\u306a\u30dd\u30a4\u30f3\u30c8]","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,173],"tags":[],"class_list":["post-12698","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apps-for-office","category-officescripts"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-OfficeScripts.jpg","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-3iO","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/12698","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=12698"}],"version-history":[{"count":8,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/12698\/revisions"}],"predecessor-version":[{"id":13109,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/12698\/revisions\/13109"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/12699"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}