{"id":647,"date":"2020-03-21T23:17:30","date_gmt":"2020-03-21T14:17:30","guid":{"rendered":"https:\/\/auto-worker.com\/blog\/?p=647"},"modified":"2020-03-21T23:50:43","modified_gmt":"2020-03-21T14:50:43","slug":"post-647","status":"publish","type":"post","link":"https:\/\/auto-worker.com\/blog\/?p=647","title":{"rendered":"Google Apps Script(GAS)\u3067\u6570\u5b57\u3092\u30ab\u30f3\u30de\u533a\u5207\u308a\u3059\u308b\u6700\u3082\u7c21\u5358\u306a\u65b9\u6cd5"},"content":{"rendered":"<p>Google Apps Script(GAS)\u3067Number\u578b(\u6570\u5b57\u578b)\u306e\u5909\u6570\u3092\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3084\u30ed\u30b0\u51fa\u529b\u3059\u308b\u969b\u306b\u300c\u30ab\u30f3\u30de(,)\u533a\u5207\u308a\u300d\u3067\u8868\u793a\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p>1000\u30921,000\u306e\u3088\u3046\u306b\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u8868\u793a\u3059\u308b\u6700\u3082\u304a\u624b\u8efd\u30fb\u7c21\u5358\u306a\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<h2>GAS\u3067\u6570\u5b57\u3092\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u51fa\u529b\u3057\u305f\u3044<\/h2>\n<p>Google Apps Script(GAS)\u3092\u4f7f\u3044\u3001\u6570\u5024\u578b\u306e\u5909\u6570\u3092\u30ed\u30b0\u3084\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u51fa\u529b\u3059\u308b\u30b1\u30fc\u30b9\u306f\u591a\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u6642\u306b\u300c10000\u300d\u306e\u3088\u3046\u306a\u30d7\u30ec\u30fc\u30f3\u306a\u6570\u5b57\u3067\u306f\u306a\u304f\u3001\u300c10,000\u300d\u306e\u3088\u3046\u306b\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u8868\u793a\u3057\u305f\u3044\u8981\u671b\u3082\u591a\u3044\u3067\u3059\u3002<\/p>\n<p>\u3082\u3061\u308d\u3093\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u5834\u5408\u306f\u51fa\u529b\u5148\u306e\u30bb\u30eb\u306e\u66f8\u5f0f\u8a2d\u5b9a\u3092\u300c\u30ab\u30f3\u30de\u533a\u5207\u308a\u300d\u306e\u8868\u8a18\u306b\u3057\u3066\u304a\u3051\u3070\u3001\u305d\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u30bb\u30eb\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u8a2d\u5b9a\u3067\u306f\u306a\u3044\u305f\u3081\u3001\u308f\u3056\u308f\u3056\u8a2d\u5b9a\u3059\u308b\u306e\u306b\u306f\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u6570\u5b57\u3092\u51fa\u529b\u3059\u308b\u6700\u3082\u7c21\u5358\u306a\u65b9\u6cd5<\/h2>\n<p>\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u6570\u5b57\u3092\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306a\u3069\u306b\u51fa\u529b\u3059\u308b\u6700\u3082\u7c21\u5358\u306a\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u300c<em><strong>toLocaleString()<\/strong><\/em>\u300d\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>toLocaleString()\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u6570\u5024\u578b(Number\u30af\u30e9\u30b9)\u306e\u5909\u6570\u3092\u6587\u5b57\u5217\u306b\u5909\u63db\u3059\u308b\u3068\u3068\u3082\u306b\u3001\u30ed\u30b1\u30fc\u30eb\u51e6\u7406\u306b\u3088\u3063\u3066\u30ab\u30f3\u30de\u533a\u5207\u308a\u306b\u3059\u308b\u51e6\u7406\u304c\u65bd\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u7d50\u679c\u3001100000\u306e\u3088\u3046\u306a\u6570\u5024\u304c\u300c100,000\u300d\u30683\u30b1\u30bf\u3054\u3068\u306b\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u51fa\u529b\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u203b\u30ed\u30b1\u30fc\u30eb\u51e6\u7406\u306f\u5b9f\u884c\u74b0\u5883\u306b\u3088\u3063\u3066\u6319\u52d5\u304c\u7570\u306a\u308a\u307e\u3059\u3002JP\u30ed\u30b1\u30fc\u30eb\u306e\u5834\u5408\u306b\u30ab\u30f3\u30de\u533a\u5207\u308a\u306b\u5909\u63db\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u6570\u5b57\u3092\u51fa\u529b\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/h2>\n<p>toLocaleString()\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u6570\u5b57\u3092\u51fa\u529b\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-673\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200321_auto_003.jpg\" alt=\"Google Apps Script(GAS)\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u6570\u5b57\u3092\u51fa\u529b\u3059\u308b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u30b9\u30af\u30ea\u30d7\u30c8\" width=\"660\" height=\"431\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200321_auto_003.jpg 660w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200321_auto_003-300x196.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200321_auto_003-530x346.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200321_auto_003-565x369.jpg 565w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/p>\n<p><code>function outputNumber() {<br \/>\n\/\/\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u7d10\u3065\u304f\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u307f<br \/>\nlet sheet = SpreadsheetApp.getActiveSheet();<br \/>\n\/\/10\u4e07\u306e\u6570\u5b57\u3092\u5b9a\u7fa9\u3059\u308b<br \/>\nlet num = 1000000;<br \/>\n\/\/A1\u30bb\u30eb\u306b\u5909\u6570num\u3092\u305d\u306e\u307e\u307e\u51fa\u529b\u3059\u308b<br \/>\nsheet.getRange(1, 1).setValue(num);<br \/>\n\/\/A2\u30bb\u30eb\u306b\u5909\u6570num\u306btoLocalString\u3092\u5b9f\u884c\u3057\u305f\u5024\u3092\u51fa\u529b\u3059\u308b<br \/>\nsheet.getRange(2, 1).setValue(num.toLocaleString());<br \/>\n}<\/code><\/p>\n<p>A1\u30bb\u30eb\u306b\u306f100000\u3068\u51fa\u529b\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001A2\u30bb\u30eb\u306b\u306f100,000\u3068\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-672\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200321_auto_002.jpg\" alt=\"Google Apps Script(GAS)\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u5b9f\u884c\u3067\u6570\u5b57\u3092\u30ab\u30f3\u30de\u533a\u5207\u308a\u306b\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u51fa\u529b\u3057\u305f\u7d50\u679c\" width=\"356\" height=\"263\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200321_auto_002.jpg 356w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200321_auto_002-300x222.jpg 300w\" sizes=\"auto, (max-width: 356px) 100vw, 356px\" \/><\/p>\n<p>\u6570\u91cf\u306a\u3069\u306e\u6570\u5b57\u3092\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u8868\u306b\u8a18\u8f09\u3059\u308b\u5834\u5408\u306f\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u65b9\u304c\u8aad\u307f\u3084\u3059\u3044\u305f\u3081\u3001toLocaleString\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3059\u308b\u306e\u304c\u30aa\u30b9\u30b9\u30e1\u3067\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u683c\u7d0d\u3055\u308c\u305f\u5024\u3068\u3057\u3066\u306f\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u30821000000\u3068\u3044\u3046\u6570\u5b57\u3068\u3057\u3066\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u6587\u5b57\u5217\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u306e\u3067\u3001\u5408\u8a08\u3084\u96c6\u8a08\u306a\u3069\u306e\u6570\u5f0f\u30fb\u95a2\u6570\u3082\u554f\u984c\u306a\u304f\u6a5f\u80fd\u3057\u307e\u3059\u3002<\/p>\n<h2>Google\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3084\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3067\u3082\u51fa\u529b\u53ef\u80fd<\/h2>\n<p>\u3053\u306etoLocaleString\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u3001\u6570\u5b57\u306e\u30ab\u30f3\u30de\u533a\u5207\u308a\u8868\u793a\u306fGoogle\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3084\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u51fa\u529b\u3059\u308b\u969b\u3082\u4f7f\u7528\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u6ce8\u6587\u66f8\u3084\u767a\u6ce8\u66f8\u3092\u4f5c\u6210\u3059\u308b<\/li>\n<li>HTML\u30d5\u30a1\u30a4\u30eb\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u6570\u5b57\u3092\u8a18\u8f09\u3059\u308b<\/li>\n<\/ul>\n<p>\u3068\u3044\u3063\u305f\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3067\u3082\u30ab\u30f3\u30de\u533a\u5207\u308a\u304c\u6d3b\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081\u30fb\u7d42\u308f\u308a\u306b<\/h2>\n<p>\u4eca\u56de\u3001Google Apps Script(GAS)\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306a\u3069\u306b\u6570\u5b57\u3092\u51fa\u529b\u3059\u308b\u5834\u5408\u306b\u3001\u30ab\u30f3\u30de\u533a\u5207\u308a\u8868\u793a\u306b\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u901a\u5e38\u306e\u6570\u5b57\u578b\u306e\u5909\u6570\u306btoLocaleString\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u30ab\u30f3\u30de\u533a\u5207\u308a\u8868\u793a\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u306f\u6570\u5024\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u306e\u3067\u8a08\u7b97\u30fb\u96c6\u8a08\u306b\u306f\u5f71\u97ff\u306f\u306a\u304f\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u3082\u9069\u7528\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u6570\u5b57\u8868\u793a\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u3054\u6d3b\u7528\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Apps Script(GAS)\u3067Number\u578b(\u6570\u5b57\u578b)\u306e\u5909\u6570\u3092\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3084\u30ed\u30b0\u51fa\u529b\u3059\u308b\u969b\u306b\u300c\u30ab\u30f3\u30de(,)\u533a\u5207\u308a\u300d\u3067\u8868\u793a\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002 1000\u30921,000\u306e\u3088\u3046\u306b\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u8868\u793a\u3059\u308b\u6700\u3082 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":671,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[14,215,206,207,205],"class_list":["post-647","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gas","tag-gas","tag-tolocalstring","tag-206","tag-207","tag-205"],"_links":{"self":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=647"}],"version-history":[{"count":4,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/647\/revisions"}],"predecessor-version":[{"id":675,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/647\/revisions\/675"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/671"}],"wp:attachment":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}