{"id":11228,"date":"2021-12-17T10:00:00","date_gmt":"2021-12-17T01:00:00","guid":{"rendered":"https:\/\/www.gigas-jp.com\/appnews\/?p=11228"},"modified":"2021-12-16T19:22:53","modified_gmt":"2021-12-16T10:22:53","slug":"javascript%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%a6%e3%80%81excel%e3%81%ae%e3%82%bb%e3%83%ab%e3%81%ab%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%a2%e3%83%83%e3%83%97%e3%83%ad%e3%83%bc%e3%83%89","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/11228","title":{"rendered":"Javascript\u3092\u4f7f\u7528\u3057\u3066\u3001Excel\u306e\u30bb\u30eb\u306b\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3092\u633f\u5165\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"952\" height=\"215\" src=\"https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2021\/12\/Screen-Shot-2021-12-16-at-14.39.24.png\" alt=\"\" class=\"wp-image-11229\" \/><\/figure>\n\n\n\n<p>\u4eca\u56de\u306f\u3001Handsontable\u3092\u4f7f\u3063\u3066\u3001\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30dc\u30bf\u30f3\u3092\u633f\u5165\u3059\u308b\u65b9\u6cd5\u3068\u3001\u30bb\u30eb\u5185\u306b\u753b\u50cf\u3092\u8868\u793a\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>Handsontable\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306711\u500b\u306e\u30a8\u30a4\u30ea\u30a2\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<ul><li>time <\/li><li>text<\/li><li>select<\/li><li>password<\/li><li>numeric<\/li><li>handsontable<\/li><li>dropdown<\/li><li>date<\/li><li>checkbox<\/li><li>base<\/li><li>autocomplete<\/li><\/ul>\n\n\n\n<p>\u3057\u304b\u3057\u3001file editor\u3067\u306f\u3001\u3053\u308c\u307e\u3067\u63d0\u4f9b\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30dc\u30bf\u30f3\u3092\u30bb\u30eb\u306b\u633f\u5165\u3059\u308b\u3053\u3068\u306f\u3001\u81ea\u5206\u81ea\u8eab\u3067\u767a\u898b\u3057\u307e\u3057\u305f\u30024\u3064\u306e\u65b9\u6cd5\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u4eca\u65e5\u306f\u305d\u306e\u3046\u3061\u306e1\u3064\u3001cells\u5185\u3067\u547c\u3073\u51fa\u3055\u308c\u308brenderer\u95a2\u6570\u3092\u4f7f\u3063\u305f\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u3001renderer\u306e\u547c\u3073\u51fa\u3057\u65b9\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30dc\u30bf\u30f3\u3068\u753b\u50cf\u306e\u8868\u793a\u65b9\u6cd5\u3092\u4e2d\u5fc3\u306b\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u3001html\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u5fc5\u8981\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u633f\u5165\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n&lt;div id=\"example1\" class=\"hot \"&gt;&lt;\/div&gt;\n\n&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/handsontable@11.0\/dist\/handsontable.full.min.js\"&gt;&lt;\/script&gt;\n&lt;link type=\"text\/css\" rel=\"stylesheet\" href=\"https:\/\/cdn.jsdelivr.net\/npm\/handsontable@11.0\/dist\/handsontable.full.min.css\" \/&gt; \n<\/code><\/pre>\n\n\n\n<p>\u6b21\u306b\u3001Handontable\u3092\u4f5c\u6210\u3057\u3001cells\u5185\u306brenderer\u3092\u547c\u3073\u51fa\u3059\u305f\u3081\u306e\u6761\u4ef6\u3092\u3044\u304f\u3064\u304b\u4f5c\u6210\u3057\u307e\u3059\u3002comments\u3068covers\u306bcustom renderer\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const hot = new Handsontable(container, {\n                data,\n                colWidths: &#091;100, 100, 200],\n                colHeaders: &#091;'Title', 'File', 'Cover'],\n                colWidths: 300,\n                renderer: 'html',\n                height: 200,\n                columns: &#091;\n                    { data: 'title' },\n                    { data: 'comments', renderer: safeHtmlRenderer },\n                    { data: 'cover', renderer: coverRenderer } \n                ],\n                cells: function (row, col, prop) {\n                    var cellProperties = {};\n                    if(col === 1){\n                        cellProperties.renderer = safeHtmlRenderer\n                    } \n                    if(col === 2){\n                        cellProperties.renderer = coverRenderer\n                    } \n                },\n                licenseKey: 'non-commercial-and-evaluation'\n            });<\/code><\/pre>\n\n\n\n<p>renderer\u95a2\u6570\u306e\u5185\u90e8\u3067\u306f\u3001\u30ab\u30b9\u30bf\u30e0html\u306e\u30c7\u30b6\u30a4\u30f3\u3092\u4f5c\u6210\u3057\u3001innerHTML\u30d7\u30ed\u30d1\u30c6\u30a3\u3067td\u306b\u633f\u5165\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function safeHtmlRenderer(instance, td, row, col, prop, value, cellProperties) {\n\n                Handsontable.renderers.TextRenderer.apply(this, arguments);\n                    td.innerHTML = '&lt;div&gt;&lt;input type=\"file\" id=\"filechange\" name=\"file&#091;]\" class=\"filebutton\"&gt;&lt;\/div&gt;';\n\n                return td;\n }<\/code><\/pre>\n\n\n\n<p>\u307e\u305f\u3001renderer\u3067\u753b\u50cf\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function coverRenderer(instance, td, row, col, prop, value, cellProperties) {\n\n                Handsontable.renderers.TextRenderer.apply(this, arguments);\n                    td.innerHTML = '&lt;img src=\"imges\/winter.jpg\" width=\"300\" height=\"150\" &gt;';\n\n                return td;\n            }<\/code><\/pre>\n\n\n\n<p>\u3053\u3053\u307e\u3067\u304a\u8aad\u307f\u3044\u305f\u3060\u304d\u3001\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>By Ami<\/p>\n<div class='wp_social_bookmarking_light'>\n            <div class=\"wsbl_google_plus_one\"><g:plusone size=\"medium\" annotation=\"none\" href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/11228\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/11228\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"Javascript\u3092\u4f7f\u7528\u3057\u3066\u3001Excel\u306e\u30bb\u30eb\u306b\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3092\u633f\u5165\u3059\u308b\u65b9\u6cd5\" data-hatena-bookmark-layout=\"standard\" title=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\"> <img src=\"\/\/b.hatena.ne.jp\/images\/entry-button\/button-only@2x.png\" alt=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\" width=\"20\" height=\"20\" style=\"border: none;\" \/><\/a><script type=\"text\/javascript\" src=\"\/\/b.hatena.ne.jp\/js\/bookmark_button.js\" charset=\"utf-8\" async=\"async\"><\/script><\/div>\n            <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/11228\" data-text=\"Javascript\u3092\u4f7f\u7528\u3057\u3066\u3001Excel\u306e\u30bb\u30eb\u306b\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3092\u633f\u5165\u3059\u308b\u65b9\u6cd5\" data-via=\"GIGASJAPAN_APPS\" data-lang=\"ja\">Tweet<\/a><\/div>\n            <div class=\"wsbl_facebook_like\"><div id=\"fb-root\"><\/div><fb:like href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/11228\" layout=\"button_count\" action=\"like\" width=\"100\" share=\"false\" show_faces=\"false\" ><\/fb:like><\/div>\n            <div class=\"wsbl_facebook_send\"><div id=\"fb-root\"><\/div><fb:send href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/11228\" colorscheme=\"light\" ><\/fb:send><\/div>\n    <\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306f\u3001Handsontable\u3092\u4f7f\u3063\u3066\u3001\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30dc\u30bf\u30f3\u3092\u633f\u5165\u3059\u308b\u65b9\u6cd5\u3068\u3001\u30bb\u30eb\u5185\u306b\u753b\u50cf\u3092\u8868\u793a\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 Handsontable\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306711\u500b\u306e\u30a8\u30a4\u30ea\u30a2\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059 [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[100],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/11228"}],"collection":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/comments?post=11228"}],"version-history":[{"count":1,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/11228\/revisions"}],"predecessor-version":[{"id":11230,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/11228\/revisions\/11230"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=11228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=11228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=11228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}