{"id":5120,"date":"2021-08-30T23:57:55","date_gmt":"2021-08-30T14:57:55","guid":{"rendered":"https:\/\/extan.jp\/?p=5120"},"modified":"2022-01-04T23:41:50","modified_gmt":"2022-01-04T14:41:50","slug":"%e3%80%90excel-vba%e3%80%91%e3%82%ab%e3%83%b3%e3%83%9e%e5%8c%ba%e5%88%87%e3%82%8a%e3%81%ae%e3%83%86%e3%82%ad%e3%82%b9%e3%83%88%e3%83%87%e3%83%bc%e3%82%bf%ef%bc%88csv%ef%bc%89%e3%82%92%e5%8f%96","status":"publish","type":"post","link":"https:\/\/extan.jp\/?p=5120","title":{"rendered":"\u3010Excel VBA\u3011\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5\uff01\u8a2d\u5b9a\u3060\u3051\u3067\u5373\u5b9f\u884c\uff01"},"content":{"rendered":"<p>Excel VBA\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u307f\u305f\u3044\u3068\u304d\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u3051\u3069\u3001\u305d\u3093\u306a\u4e2d\u3067\u60a9\u3080\u3053\u3068\u306f\u3001<\/p>\n<div class=\"kininarukoto1\">\u30fbExcel VBA\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u3084\u308a\u65b9\u304c\u308f\u304b\u3089\u306a\u3044\u3002<br \/>\n\u30fbExcel VBA\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u8a2d\u5b9a\u304c\u8907\u96d1\u3067\u308f\u304b\u3089\u306a\u3044\u3002<\/div>\n<p>\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u4eca\u56de\u306f\u305d\u3093\u306a\u304a\u60a9\u307f\u3092\u89e3\u6c7a\u3059\u308b\u3001<\/p>\n<div class=\"rdinfo\">\u30fbExcel VBA\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5<\/div>\n<p>\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\uff01<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_66_1 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\"><p class=\"ez-toc-title\">\u3082\u304f\u3058<\/p>\n<\/div><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/extan.jp\/?p=5120\/#%E3%82%AB%E3%83%B3%E3%83%9E%E5%8C%BA%E5%88%87%E3%82%8A%E3%81%AE%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%83%87%E3%83%BC%E3%82%BF%EF%BC%88CSV%E5%BD%A2%E5%BC%8F%EF%BC%89%E3%82%92%E5%8F%96%E3%82%8A%E8%BE%BC%E3%82%80%E5%9F%BA%E6%9C%AC%E6%93%8D%E4%BD%9C\" title=\"\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\u5f62\u5f0f\uff09\u3092\u53d6\u308a\u8fbc\u3080\u57fa\u672c\u64cd\u4f5c\">\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\u5f62\u5f0f\uff09\u3092\u53d6\u308a\u8fbc\u3080\u57fa\u672c\u64cd\u4f5c<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/extan.jp\/?p=5120\/#%E5%9F%BA%E6%9C%AC%E6%93%8D%E4%BD%9C%E3%81%AE%E6%89%8B%E9%A0%86\" title=\"\u57fa\u672c\u64cd\u4f5c\u306e\u624b\u9806\">\u57fa\u672c\u64cd\u4f5c\u306e\u624b\u9806<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/extan.jp\/?p=5120\/#%E3%82%AB%E3%83%B3%E3%83%9E%E5%8C%BA%E5%88%87%E3%82%8A%E3%81%AE%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%83%87%E3%83%BC%E3%82%BF%EF%BC%88CSV%E5%BD%A2%E5%BC%8F%EF%BC%89%E3%82%92%E5%8F%96%E3%82%8A%E8%BE%BC%E3%82%80VBA-PowerQuery%E3%82%92%E4%BD%BF%E7%94%A8\" title=\"\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\u5f62\u5f0f\uff09\u3092\u53d6\u308a\u8fbc\u3080VBA-PowerQuery\u3092\u4f7f\u7528\">\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\u5f62\u5f0f\uff09\u3092\u53d6\u308a\u8fbc\u3080VBA-PowerQuery\u3092\u4f7f\u7528<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/extan.jp\/?p=5120\/#%E8%A1%A8%E3%81%AE%E5%90%8D%E5%89%8D%E3%82%92%E6%8C%87%E5%AE%9A%E3%81%99%E3%82%8B\" title=\"\u8868\u306e\u540d\u524d\u3092\u6307\u5b9a\u3059\u308b\">\u8868\u306e\u540d\u524d\u3092\u6307\u5b9a\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/extan.jp\/?p=5120\/#CSV%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AE%E3%83%91%E3%82%B9%E3%82%92%E6%8C%87%E5%AE%9A\" title=\"CSV\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u6307\u5b9a\">CSV\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u6307\u5b9a<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/extan.jp\/?p=5120\/#%E3%83%87%E3%83%BC%E3%82%BF%E3%81%AE%E5%8C%BA%E5%88%87%E3%82%8A%E6%96%87%E5%AD%97%E3%82%92%E6%8C%87%E5%AE%9A\" title=\"\u30c7\u30fc\u30bf\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u6307\u5b9a\">\u30c7\u30fc\u30bf\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u6307\u5b9a<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/extan.jp\/?p=5120\/#%E8%A1%A8%E6%8C%BF%E5%85%A5%E4%BD%8D%E7%BD%AE%E3%82%92%E6%8C%87%E5%AE%9A\" title=\"\u8868\u633f\u5165\u4f4d\u7f6e\u3092\u6307\u5b9a\">\u8868\u633f\u5165\u4f4d\u7f6e\u3092\u6307\u5b9a<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/extan.jp\/?p=5120\/#Column%EF%BC%88%E5%88%97%EF%BC%89%E3%81%AE%E6%95%B0%E3%81%A8%E5%88%97%E3%81%AE%E3%83%87%E3%83%BC%E3%82%BF%E5%9E%8B%E3%82%92%E6%8C%87%E5%AE%9A\" title=\"Column\uff08\u5217\uff09\u306e\u6570\u3068\u5217\u306e\u30c7\u30fc\u30bf\u578b\u3092\u6307\u5b9a\">Column\uff08\u5217\uff09\u306e\u6570\u3068\u5217\u306e\u30c7\u30fc\u30bf\u578b\u3092\u6307\u5b9a<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/extan.jp\/?p=5120\/#VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B\" title=\"VBA\u3092\u5b9f\u884c\u3059\u308b\">VBA\u3092\u5b9f\u884c\u3059\u308b<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/extan.jp\/?p=5120\/#%E3%82%AB%E3%83%A9%E3%83%A0%EF%BC%88%E5%88%97%EF%BC%89%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B\" title=\"\u30ab\u30e9\u30e0\uff08\u5217\uff09\u3092\u8ffd\u52a0\u3059\u308b\">\u30ab\u30e9\u30e0\uff08\u5217\uff09\u3092\u8ffd\u52a0\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/extan.jp\/?p=5120\/#%E3%82%AB%E3%83%A9%E3%83%A0%E5%90%8D%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B%E3%80%82\" title=\"\u30ab\u30e9\u30e0\u540d\u3092\u5909\u66f4\u3059\u308b\u3002\">\u30ab\u30e9\u30e0\u540d\u3092\u5909\u66f4\u3059\u308b\u3002<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/extan.jp\/?p=5120\/#%E3%83%87%E3%83%BC%E3%82%BF%E3%81%AE%E5%8C%BA%E5%88%87%E3%82%8A%E6%96%87%E5%AD%97%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B\" title=\"\u30c7\u30fc\u30bf\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u5909\u66f4\u3059\u308b\">\u30c7\u30fc\u30bf\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u5909\u66f4\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/extan.jp\/?p=5120\/#VBA%E3%81%AE%E8%AA%AC%E6%98%8E\" title=\"VBA\u306e\u8aac\u660e\">VBA\u306e\u8aac\u660e<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/extan.jp\/?p=5120\/#VBA%E3%81%AE%E5%AE%9F%E8%A3%85%E6%89%8B%E9%A0%86\" title=\"VBA\u306e\u5b9f\u88c5\u624b\u9806\">VBA\u306e\u5b9f\u88c5\u624b\u9806<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/extan.jp\/?p=5120\/#VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B-2\" title=\"VBA\u3092\u5b9f\u884c\u3059\u308b\">VBA\u3092\u5b9f\u884c\u3059\u308b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/extan.jp\/?p=5120\/#%E3%81%95%E3%81%84%E3%81%94%E3%81%AB\" title=\"\u3055\u3044\u3054\u306b\">\u3055\u3044\u3054\u306b<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%E3%82%AB%E3%83%B3%E3%83%9E%E5%8C%BA%E5%88%87%E3%82%8A%E3%81%AE%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%83%87%E3%83%BC%E3%82%BF%EF%BC%88CSV%E5%BD%A2%E5%BC%8F%EF%BC%89%E3%82%92%E5%8F%96%E3%82%8A%E8%BE%BC%E3%82%80%E5%9F%BA%E6%9C%AC%E6%93%8D%E4%BD%9C\"><\/span>\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\u5f62\u5f0f\uff09\u3092\u53d6\u308a\u8fbc\u3080\u57fa\u672c\u64cd\u4f5c<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Excel2016\u304b\u3089CSV\u30d5\u30a1\u30a4\u30eb\u304cExcel\u3078\u53d6\u308a\u8fbc\u3080\u3053\u3068\u304c\u3088\u308a\u7c21\u5358\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u306e\u5834\u3067\u30b5\u30af\u30c3\u3068\u53d6\u308a\u8fbc\u307f\u305f\u3044\u5834\u5408\u306f\u3053\u3061\u3089\u306e\u6a19\u6e96\u6a5f\u80fd\u3092\u4f7f\u3046\u3068\u3068\u3066\u3082\u4fbf\u5229\u3067\u3059\u306e\u3067\u3001\u305c\u3072\u899a\u3048\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9F%BA%E6%9C%AC%E6%93%8D%E4%BD%9C%E3%81%AE%E6%89%8B%E9%A0%86\"><\/span>\u57fa\u672c\u64cd\u4f5c\u306e\u624b\u9806<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u3001\u4efb\u610f\u306e\u7b87\u6240\u3078CSV\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5222\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp5.png\" alt=\"\" width=\"305\" height=\"147\" srcset=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp5.png 305w, https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp5-300x145.png 300w\" sizes=\"auto, (max-width: 305px) 100vw, 305px\" \/>\n<p>\u7a7a\u306eExcel\u30d6\u30c3\u30af\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5221\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp4.png\" alt=\"\" width=\"385\" height=\"248\" srcset=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp4.png 385w, https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp4-300x193.png 300w\" sizes=\"auto, (max-width: 385px) 100vw, 385px\" \/>\n<p>\u300c\u30c7\u30fc\u30bf\u300d\u30bf\u30d6\u3092\u5c55\u958b\u3057\u3001\u300c\u30c6\u30ad\u30b9\u30c8\u307e\u305f\u306fCSV\u304b\u3089\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5218\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp1.png\" alt=\"\" width=\"465\" height=\"259\" srcset=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp1.png 465w, https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp1-300x167.png 300w\" sizes=\"auto, (max-width: 465px) 100vw, 465px\" \/>\n<p>\u5148\u307b\u3069\u4f5c\u6210\u3057\u305fCSV\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5220\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp3.png\" alt=\"\" width=\"211\" height=\"144\" \/>\n<p>CSV\u30c7\u30fc\u30bf\u304c\u8868\u5909\u63db\u3055\u308c\u3001\u30d7\u30ec\u30d3\u30e5\u30fc\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u554f\u984c\u306a\u3051\u308c\u3070\u300c\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3080\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u53d6\u308a\u8fbc\u307f\u3057\u307e\u3059\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5219\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp2.png\" alt=\"\" width=\"766\" height=\"365\" srcset=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp2.png 766w, https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp2-300x143.png 300w, https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp2-718x342.png 718w\" sizes=\"auto, (max-width: 766px) 100vw, 766px\" \/><\/p>\n<p>\u306f\u3044\u3001\u3067\u304d\u307e\u3057\u305f\u306d\u3002<\/p>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5223\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp6.png\" alt=\"\" width=\"418\" height=\"190\" srcset=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp6.png 418w, https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp6-300x136.png 300w\" sizes=\"auto, (max-width: 418px) 100vw, 418px\" \/>\n<p><script><\/p>\n<p><\/script><\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E3%82%AB%E3%83%B3%E3%83%9E%E5%8C%BA%E5%88%87%E3%82%8A%E3%81%AE%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%83%87%E3%83%BC%E3%82%BF%EF%BC%88CSV%E5%BD%A2%E5%BC%8F%EF%BC%89%E3%82%92%E5%8F%96%E3%82%8A%E8%BE%BC%E3%82%80VBA-PowerQuery%E3%82%92%E4%BD%BF%E7%94%A8\"><\/span>\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\u5f62\u5f0f\uff09\u3092\u53d6\u308a\u8fbc\u3080VBA-PowerQuery\u3092\u4f7f\u7528<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u3053\u308c\u307e\u3067VBA\u3092\u5229\u7528\u3057\u3066\u3001Excel\u3078\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u8fbc\u3080\u969b\u306f\u3001OPEN\u30e1\u30bd\u30c3\u30c9\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\u30011\u884c\u3065\u3064Split\u3067\u533a\u5207\u3063\u3066\u30bb\u30eb\u3078\u4ee3\u5165\u3059\u308b\u65b9\u5f0f\u304c\u4e3b\u6d41\u3067\u3057\u305f\u304c\u3001\u52d5\u4f5c\u304c\u91cd\u3044\u3053\u3068\u304c\u96e3\u70b9\u3067\u3057\u305f\u3002<\/p>\n<p>Excel2016\u304b\u3089PowerQuery\u3092\u4f7f\u3063\u305fCSV\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u8fbc\u307f\u304c\u6a19\u6e96\u3067\u7528\u610f\u3055\u308c\u52b9\u7387\u3088\u304f\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u306e\u3067\u3001VBA\u3067\u3082\u540c\u3058\u304fPowerQuery\u3092\u4f7f\u3063\u3066\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u3092Excel\u3078\u53d6\u308a\u8fbc\u3080\u51e6\u7406\u3092\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u65e9\u901f\u3067\u3059\u304c\u3001\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<br \/>\n\u5b9f\u884c\u7d50\u679c\u306f\u57fa\u672c\u64cd\u4f5c\u3082\u306e\u3068\u540c\u69d8\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Sub CSV\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u8fbc\u3080_PowerQuery\u7248()\n\nDim strTableName As String\nDim strFilePass As String\nDim strSplitword As String\nDim strStartCell As String\nDim intColumnum As Integer\nDim strColumn As String\n\n\n&#039;\u8868\u306e\u540d\u524d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u540d\u524d\u306f\u4efb\u610f\u3067\u7d50\u69cb\u3067\u3059\u3002\nstrTableName = &quot;hyou1&quot;\n\n&#039;CSV\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\nstrFilePass = &quot;F:\\test\\data.csv&quot;\n\n&#039;\u30c7\u30fc\u30bf\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\nstrSplitword = &quot;,&quot;\n\n&#039;\u8868\u633f\u5165\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5de6\u4e0a\u306e\u652f\u70b9\u3068\u306a\u308b\u30bb\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\nstrStartCell = &quot;C2&quot;\n\n&#039;Column\uff08\u5217\uff09\u306e\u6570\u3068\u5217\u306e\u30c7\u30fc\u30bf\u578b\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002CSV\u30d5\u30a1\u30a4\u30eb\u306e\u30c7\u30fc\u30bf\u69cb\u6210\u306b\u3042\u308f\u305b\u3066\u304f\u3060\u3055\u3044\u3002\u203b&quot;Column*&quot;\u306f\u5909\u66f4\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002\nintColumnum = &quot;4&quot;\nstrColumn = &quot;{{&quot;&quot;Column1&quot;&quot;, Int64.Type}, {&quot;&quot;Column2&quot;&quot;, type text}, {&quot;&quot;Column3&quot;&quot;, type text}, {&quot;&quot;Column4&quot;&quot;, type date}}&quot;\n\n&#039;Column\u540d\u3092\u5909\u66f4\u3059\u308b\u5834\u5408\u306f\u5404Column\u3054\u3068\u306b\u5909\u66f4\u5f8c\u306e\u5024\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5909\u66f4\u3057\u305f\u304f\u306a\u3044\u5834\u5408\u306f\u5bfe\u8c61Column\u306e\u8a2d\u5b9a\u3092\u524a\u9664\u3001\u3059\u3079\u3066\u5909\u66f4\u3057\u306a\u3044\u5834\u5408\u306f&quot;{}&quot;\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\nstrChangeColumn = &quot;{}&quot;\n\nSet objWorkbook = ThisWorkbook\n\n&#039;\u524d\u56de\u4f5c\u6210\u3057\u305f\u30af\u30a8\u30ea\u3092\u524a\u9664\u3057\u307e\u3059\u3002\nFor Each Query In objWorkbook.Queries\n    Query.Delete\nNext\n\n&#039;\u6307\u5b9a\u7bc4\u56f2\u306b\u3042\u308b\u8868\u3092\u524a\u9664\u3057\u307e\u3059\u3002\u7bc4\u56f2\u6307\u5b9a\u306f\u9069\u5b9c\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\nRange(&quot;A1:H10&quot;).ClearContents\n\n&#039;CSV\u30d5\u30a1\u30a4\u30eb\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u307f\u30af\u30a8\u30ea\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\nobjWorkbook.Queries.Add Name:=strTableName, Formula:= _\n&quot;let&quot; &amp; Chr(13) &amp; &quot;&quot; &amp; Chr(10) &amp; &quot;    \u30bd\u30fc\u30b9 = Csv.Document(File.Contents(&quot;&quot;&quot; &amp; strFilePass &amp; &quot;&quot;&quot;),[Delimiter=&quot;&quot;&quot; &amp; strSplitword &amp; &quot;&quot;&quot;, Columns=&quot; &amp; intColumnum &amp; &quot;, Encoding=932, QuoteStyle=QuoteStyle.None]),&quot; &amp; Chr(13) &amp; &quot;&quot; &amp; Chr(10) &amp; &quot;    \u5909\u66f4\u3055\u308c\u305f\u578b = Table.TransformColumnTypes(\u30bd\u30fc\u30b9,&quot; &amp; strColumn &amp; &quot;),&quot; &amp; Chr(13) &amp; &quot;&quot; &amp; Chr(10) &amp; &quot;    #&quot;&quot;\u540d\u524d\u304c\u5909\u66f4\u3055\u308c\u305f\u5217 &quot;&quot; = Table.RenameColumns(\u5909\u66f4\u3055\u308c\u305f\u578b,&quot; &amp; strChangeColumn &amp; &quot;)&quot; &amp; Chr(13) &amp; &quot;&quot; &amp; Chr(10) &amp; &quot;in&quot; &amp; Chr(13) &amp; &quot;&quot; &amp; Chr(10) &amp; &quot;    #&quot;&quot;\u540d\u524d\u304c\u5909\u66f4\u3055\u308c\u305f\u5217 &quot;&quot;&quot;\n\n\nWith objWorkbook.ActiveSheet.ListObjects.Add(SourceType:=0, Source:= _\n    &quot;OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=&quot;&quot;&quot; &amp; strTableName &amp; &quot;&quot;&quot;;Extended Properties=&quot;&quot;&quot;&quot;&quot; _\n    , Destination:=Range(&quot;&quot; &amp; strStartCell &amp; &quot;&quot;)).QueryTable\n    .CommandType = xlCmdSql\n    .CommandText = Array(&quot;SELECT * FROM [&quot; &amp; strTableName &amp; &quot;]&quot;)\n    .PreserveColumnInfo = True\n    .ListObject.DisplayName = strTableName\n    .Refresh BackgroundQuery:=False\nEnd With\n\n\nEnd Sub<\/code><\/pre>\n<p>\u306a\u304a\u3001\u8a2d\u5b9a\u7b87\u6240\u304c\u591a\u6570\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u9806\u306b\u8aac\u660e\u3092\u3057\u307e\u3059\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E8%A1%A8%E3%81%AE%E5%90%8D%E5%89%8D%E3%82%92%E6%8C%87%E5%AE%9A%E3%81%99%E3%82%8B\"><\/span>\u8868\u306e\u540d\u524d\u3092\u6307\u5b9a\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u8868\u306e\u540d\u524d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u540d\u524d\u306f\u4efb\u610f\u3067\u7d50\u69cb\u3067\u3059\u3002<\/p>\n<div class=\"info\">strTableName = &#8220;hyou1&#8221;<\/div>\n<h3><span class=\"ez-toc-section\" id=\"CSV%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AE%E3%83%91%E3%82%B9%E3%82%92%E6%8C%87%E5%AE%9A\"><\/span>CSV\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u6307\u5b9a<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>CSV\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\">strFilePass = &#8220;F:\\test\\data.csv&#8221;<\/div>\n<h3><span class=\"ez-toc-section\" id=\"%E3%83%87%E3%83%BC%E3%82%BF%E3%81%AE%E5%8C%BA%E5%88%87%E3%82%8A%E6%96%87%E5%AD%97%E3%82%92%E6%8C%87%E5%AE%9A\"><\/span>\u30c7\u30fc\u30bf\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u6307\u5b9a<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u30c7\u30fc\u30bf\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u4eca\u56de\u306f\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u3059\u306e\u3067\u3001&#8221;,&#8221;\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\">strSplitword = &#8220;,&#8221;<\/div>\n<h3><span class=\"ez-toc-section\" id=\"%E8%A1%A8%E6%8C%BF%E5%85%A5%E4%BD%8D%E7%BD%AE%E3%82%92%E6%8C%87%E5%AE%9A\"><\/span>\u8868\u633f\u5165\u4f4d\u7f6e\u3092\u6307\u5b9a<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u8868\u633f\u5165\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5de6\u4e0a\u306e\u652f\u70b9\u3068\u306a\u308b\u30bb\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u30b5\u30f3\u30d7\u30eb\u3067\u306f&#8221;A1&#8243;\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"info\">strStartCell = &#8220;A1&#8221;<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u306f\u3058\u307e\u308a--><\/p>\n<div class=\"balloon5\">\n<div class=\"faceicon\">\n<img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/11\/taka_kao.gif\" alt=\"\u30bf\u30ab\u30d2\u30ed\" width=\"110\" height=\"110\" \/>\n<div class=\"faceiconfont\">\u30bf\u30ab\u30d2\u30ed<\/div>\n<\/div>\n<div class=\"chatting\">\n<div class=\"says\">\u4f8b\u3048\u3070C2\u3068\u6307\u5b9a\u3059\u308b\u3068\u56f3\u306e\u3088\u3046\u306a\u4f4d\u7f6e\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5224\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp7.png\" alt=\"\" width=\"570\" height=\"226\" srcset=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp7.png 570w, https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp7-300x119.png 300w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><\/div>\n<\/div>\n<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u7d42\u308f\u308a--><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Column%EF%BC%88%E5%88%97%EF%BC%89%E3%81%AE%E6%95%B0%E3%81%A8%E5%88%97%E3%81%AE%E3%83%87%E3%83%BC%E3%82%BF%E5%9E%8B%E3%82%92%E6%8C%87%E5%AE%9A\"><\/span>Column\uff08\u5217\uff09\u306e\u6570\u3068\u5217\u306e\u30c7\u30fc\u30bf\u578b\u3092\u6307\u5b9a<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Column\uff08\u5217\uff09\u306e\u6570\u3068\u5217\u306e\u30c7\u30fc\u30bf\u578b\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\nCSV\u30d5\u30a1\u30a4\u30eb\u306e\u30c7\u30fc\u30bf\u69cb\u6210\u306b\u3042\u308f\u305b\u3066\u304f\u3060\u3055\u3044\u3002\u306a\u304a&#8221;Column1\uff5e4&#8243;\u3068\u306a\u3063\u3066\u3044\u308b\u30ab\u30e9\u30e0\u540d\u306f\u56fa\u5b9a\u3067\u3001\u5225\u306e\u30ab\u30e9\u30e0\u540d\u3092\u6307\u5b9a\u3059\u308b\u3068\u8aad\u307f\u8fbc\u307f\u6642\u306b\u300cColumn\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u300d\u3068\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u306e\u3067\u3001\u30ab\u30e9\u30e0\u540d\u306f\u5909\u66f4\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><!--\u5439\u304d\u51fa\u3057\u306f\u3058\u307e\u308a--><\/p>\n<div class=\"balloon5\">\n<div class=\"faceicon\">\n<img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/11\/taka_kao.gif\" alt=\"\u30bf\u30ab\u30d2\u30ed\" width=\"110\" height=\"110\" \/>\n<div class=\"faceiconfont\">\u30bf\u30ab\u30d2\u30ed<\/div>\n<\/div>\n<div class=\"chatting\">\n<div class=\"says\">\u30ab\u30e9\u30e0\uff08\u5217\uff09\u3092\u8ffd\u52a0\u3059\u308b\u5834\u5408\u306e\u624b\u9806\u306f\u4ee5\u4e0b\u300c\u30ab\u30e9\u30e0\uff08\u5217\uff09\u3092\u8ffd\u52a0\u3059\u308b\u300d\u306e\u7ae0\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/div>\n<\/div>\n<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u7d42\u308f\u308a--><\/p>\n<p>\u5217\u306e\u30c7\u30fc\u30bf\u578b\u306f\u30c7\u30fc\u30bf\u306e\u5f62\u5f0f\u306b\u5408\u308f\u305b\u3066\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u4ee3\u8868\u7684\u306a\u30c7\u30fc\u30bf\u578b\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<div class=\"info\">\u30fb\u6570\u5024\uff1aInt64.Type<br \/>\n\u30fb\u30c6\u30ad\u30b9\u30c8\uff1a type text<br \/>\n\u30fb\u65e5\u4ed8\uff1atype date<\/div>\n<h3><span class=\"ez-toc-section\" id=\"VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B\"><\/span>VBA\u3092\u5b9f\u884c\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u8a2d\u5b9a\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3055\u3063\u305d\u304fVBA\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u306f\u3044\u3001\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u304c\u8aad\u307f\u8fbc\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u306d\u3002<\/p>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5223\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp6.png\" alt=\"\" width=\"418\" height=\"190\" srcset=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp6.png 418w, https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp6-300x136.png 300w\" sizes=\"auto, (max-width: 418px) 100vw, 418px\" \/>\n<p>\u6b21\u306f\u5217\u3092\u5897\u3084\u3057\u305f\u308a\u3001\u30ab\u30e9\u30e0\u540d\u3092\u5909\u66f4\u3057\u305f\u308a\u30ab\u30b9\u30bf\u30e0\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><script><\/p>\n<p><\/script><\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E3%82%AB%E3%83%A9%E3%83%A0%EF%BC%88%E5%88%97%EF%BC%89%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B\"><\/span>\u30ab\u30e9\u30e0\uff08\u5217\uff09\u3092\u8ffd\u52a0\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u30ab\u30e9\u30e0\uff08\u5217\uff09\u3092\u8ffd\u52a0\u3059\u308b\u5834\u5408\u306e\u624b\u9806\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u5143\u30c7\u30fc\u30bf\u3068\u306a\u308bCSV\u30d5\u30a1\u30a4\u30eb\u3078\u30ab\u30f3\u30de\u3068\u5024\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\n\u30b5\u30f3\u30d7\u30eb\u3067\u306f\u53f3\u7aef\u306b\u90fd\u9053\u5e9c\u770c\u306e\u5024\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5225\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp8.png\" alt=\"\" width=\"284\" height=\"143\" \/>\n<p>\u6b21\u306bVBA\u5074\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u30ab\u30e9\u30e0\uff08\u5217\uff09\u304c\u8ffd\u52a0\u3055\u308c\u305f\u306e\u30674\u304b\u30895\u3078\u5024\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\">intColumnum = &#8220;5&#8221;<\/div>\n<p>\u8ffd\u52a0\u30ab\u30e9\u30e0\u306e\u30ab\u30e9\u30e0\u540d\u3092&#8221;Column5&#8243;\u306b\u3057\u3001\u30c7\u30fc\u30bf\u578b\u306f\u6587\u5b57\u5217\u3092\u793a\u3059\u300ctype text\u300d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\">strColumn = &#8220;{{&#8220;&#8221;Column1&#8243;&#8221;, Int64.Type}, {&#8220;&#8221;Column2&#8243;&#8221;, type text}, {&#8220;&#8221;Column3&#8243;&#8221;, type text}, {&#8220;&#8221;Column4&#8243;&#8221;, type date}}&#8221;<\/div>\n<div><\/div>\n<div>\u8a2d\u5b9a\u3092\u7d42\u3048\u305f\u3089VBA\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/div>\n<p>\u306f\u3044\u3001\u30ab\u30e9\u30e0\uff08\u5217\uff09\u304c\u8ffd\u52a0\u3055\u308c\u3001\u5143\u30c7\u30fc\u30bf\u306e\u5024\u3082\u633f\u5165\u3055\u308c\u307e\u3057\u305f\u306d\u3002<\/p>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5226\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp9.png\" alt=\"\" width=\"515\" height=\"189\" srcset=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp9.png 515w, https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp9-300x110.png 300w\" sizes=\"auto, (max-width: 515px) 100vw, 515px\" \/>\n<p><script><\/p>\n<p><\/script><\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E3%82%AB%E3%83%A9%E3%83%A0%E5%90%8D%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B%E3%80%82\"><\/span>\u30ab\u30e9\u30e0\u540d\u3092\u5909\u66f4\u3059\u308b\u3002<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30ab\u30e9\u30e0\u540d\u306f&#8221;Column*&#8221;\u3068\u306a\u308a\u307e\u3059\u304c\u3001\u306a\u3093\u306e\u5217\u304b\u308f\u304b\u308a\u3065\u3089\u3044\u3067\u3059\u306d\u3002<br \/>\n\u3053\u3061\u3089\u3092\u6307\u5b9a\u3059\u308b\u30ab\u30e9\u30e0\u540d\u306b\u5909\u66f4\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u3067\u306f\u300c\u9805\u756a\u300d\u3001\u300c\u5546\u54c1\u540d\u300d\u3001\u300c\u5358\u4fa1\u300d\u3001\u300c\u8cfc\u5165\u65e5\u300d\u3001\u300c\u7523\u5730\uff08\u8ffd\u52a0\uff09\u300d\u3068\u3044\u3046\u9805\u76ee\u540d\u306b\u3059\u308b\u305f\u3081<br \/>\nstrChangeColumn = &#8220;{}&#8221;\u3092\u4ee5\u4e0b\u3078\u5165\u308c\u66ff\u3048\u307e\u3059\u3002<\/p>\n<div class=\"info\">strChangeColumn = &#8220;{{&#8220;&#8221;Column1&#8243;&#8221;, &#8220;&#8221;\u9805\u756a&#8221;&#8221;}, {&#8220;&#8221;Column2&#8243;&#8221;, &#8220;&#8221;\u5546\u54c1\u540d&#8221;&#8221;}, {&#8220;&#8221;Column3&#8243;&#8221;, &#8220;&#8221;\u5358\u4fa1&#8221;&#8221;}, {&#8220;&#8221;Column4&#8243;&#8221;, &#8220;&#8221;\u8cfc\u5165\u65e5&#8221;&#8221;}, {&#8220;&#8221;Column5&#8243;&#8221;, &#8220;&#8221;\u7523\u5730\uff08\u8ffd\u52a0\uff09&#8221;&#8221;}}&#8221;<\/div>\n<p>\u30b3\u30d4\u30da\u3067\u5165\u308c\u66ff\u3048\u5b9f\u884c\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u306f\u3044\u3001\u30ab\u30e9\u30e0\u540d\u304c\u6a19\u6e96\u304b\u3089\u6307\u5b9a\u306e\u5024\u3078\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5227\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp10.png\" alt=\"\" width=\"447\" height=\"192\" srcset=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp10.png 447w, https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/083021_1433_temp10-300x129.png 300w\" sizes=\"auto, (max-width: 447px) 100vw, 447px\" \/><\/p>\n<p><script><\/p>\n<p><\/script><\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E3%83%87%E3%83%BC%E3%82%BF%E3%81%AE%E5%8C%BA%E5%88%87%E3%82%8A%E6%96%87%E5%AD%97%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B\"><\/span>\u30c7\u30fc\u30bf\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u5909\u66f4\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c7\u30fc\u30bf\u306e\u307b\u304b\u306b\u5225\u306e\u6587\u5b57\u306e\u6307\u5b9a\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<div class=\"info\">strSplitword = &#8220;,&#8221;<\/div>\n<p>\u30b3\u30ed\u30f3&#8221;:&#8221;\u3084\u30bf\u30d6\u3001\u30b9\u30da\u30fc\u30b9\u306a\u3069\u306e\u6307\u5b9a\u304c\u53ef\u80fd\u3067\u3059\u3002<br \/>\n\u306a\u304a\u30bf\u30d6\u306e\u5834\u5408\u306f\u76f4\u63a5\u5024\u306b\u8a2d\u5b9a\u306f\u3067\u304d\u307e\u305b\u3093\u306e\u3067\u3001Chr(9)\u3092\u6307\u5b9a\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"info\">&#8216;\u30bf\u30d6\u533a\u5207\u308a<br \/>\nstrSplitword = Chr(9)<br \/>\n&#8216;\u30b3\u30ed\u30f3\u533a\u5207\u308a<br \/>\nstrSplitword = &#8220;:&#8221;<br \/>\n&#8216;\u30bb\u30df\u30b3\u30ed\u30f3\u533a\u5207\u308a<br \/>\nstrSplitword = &#8220;;&#8221;<br \/>\n&#8216;\u30b9\u30da\u30fc\u30b9\u533a\u5207\u308a<br \/>\nstrSplitword = &#8221; &#8220;<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u306f\u3058\u307e\u308a--><\/p>\n<div class=\"balloon5\">\n<div class=\"faceicon\">\n<img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/11\/taka_kao.gif\" alt=\"\u30bf\u30ab\u30d2\u30ed\" width=\"110\" height=\"110\" \/>\n<div class=\"faceiconfont\">\u30bf\u30ab\u30d2\u30ed<\/div>\n<\/div>\n<div class=\"chatting\">\n<div class=\"says\">\u3053\u3053\u307e\u3067\u8ffd\u52a0\u8a2d\u5b9a\u3092\u3057\u305fVBA\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3054\u53c2\u8003\u304f\u3060\u3055\u3044\u3002<\/div>\n<\/div>\n<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u7d42\u308f\u308a--><\/p>\n<pre style=\"padding: 0;\"><code class=\"language-visual-basic line-numbers\">Sub CSV\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u8fbc\u3080_PowerQuery\u7248_\u8ffd\u52a0()\n\nDim strTableName As String\nDim strFilePass As String\nDim strSplitword As String\nDim strStartCell As String\nDim intColumnum As Integer\nDim strColumn As String\n\n\n\n&#039;\u8868\u306e\u540d\u524d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u540d\u524d\u306f\u4efb\u610f\u3067\u7d50\u69cb\u3067\u3059\u3002\nstrTableName = &quot;hyou1&quot;\n\n&#039;CSV\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\nstrFilePass = &quot;F:\\test\\data.csv&quot;\n\n&#039;\u30c7\u30fc\u30bf\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\nstrSplitword = &quot;,&quot;\n\n&#039;\u30bf\u30d6\u533a\u5207\u308a\n&#039;strSplitword = Chr(9)\n&#039;\u30b3\u30ed\u30f3\u533a\u5207\u308a\n&#039;strSplitword = &quot;:&quot;\n&#039;\u30bb\u30df\u30b3\u30ed\u30f3\u533a\u5207\u308a\n&#039;strSplitword = &quot;;&quot;\n&#039;\u30b9\u30da\u30fc\u30b9\u533a\u5207\u308a\n&#039;strSplitword = &quot; &quot;\n\n\n\n&#039;\u8868\u633f\u5165\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5de6\u4e0a\u306e\u652f\u70b9\u3068\u306a\u308b\u30bb\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\nstrStartCell = &quot;A1&quot;\n\n&#039;Column\uff08\u5217\uff09\u306e\u6570\u3068Column\u30bf\u30a4\u30d7\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002CSV\u30d5\u30a1\u30a4\u30eb\u306e\u30c7\u30fc\u30bf\u69cb\u6210\u306b\u3042\u308f\u305b\u3066\u304f\u3060\u3055\u3044\u3002\u203b&quot;Column*&quot;\u306f\u5909\u66f4\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002\nintColumnum = &quot;5&quot;\n&#039;strColumn = &quot;{{&quot;&quot;Column1&quot;&quot;, type text}, {&quot;&quot;Column2&quot;&quot;, type text}, {&quot;&quot;Column3&quot;&quot;, type text}, {&quot;&quot;Column4&quot;&quot;, type text}}&quot;\nstrColumn = &quot;{{&quot;&quot;Column1&quot;&quot;, Int64.Type}, {&quot;&quot;Column2&quot;&quot;, type text}, {&quot;&quot;Column3&quot;&quot;, type text}, {&quot;&quot;Column4&quot;&quot;, type date}, {&quot;&quot;Column5&quot;&quot;,  type text}}&quot;\n\n&#039;Column\u540d\u3092\u5909\u66f4\u3059\u308b\u5834\u5408\u306f\u5404Column\u3054\u3068\u306b\u5909\u66f4\u5f8c\u306e\u5024\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5909\u66f4\u3057\u305f\u304f\u306a\u3044\u5834\u5408\u306f\u5bfe\u8c61Column\u306e\u8a2d\u5b9a\u3092\u524a\u9664\u3001\u3059\u3079\u3066\u5909\u66f4\u3057\u306a\u3044\u5834\u5408\u306f&quot;{}&quot;\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\nstrChangeColumn = &quot;{{&quot;&quot;Column1&quot;&quot;, &quot;&quot;\u9805\u756a&quot;&quot;}, {&quot;&quot;Column2&quot;&quot;, &quot;&quot;\u5546\u54c1\u540d&quot;&quot;}, {&quot;&quot;Column3&quot;&quot;, &quot;&quot;\u5358\u4fa1&quot;&quot;}, {&quot;&quot;Column4&quot;&quot;, &quot;&quot;\u8cfc\u5165\u65e5&quot;&quot;}, {&quot;&quot;Column5&quot;&quot;, &quot;&quot;\u7523\u5730\uff08\u8ffd\u52a0\uff09&quot;&quot;}}&quot;\n&#039;strChangeColumn = &quot;{}&quot;\n\nSet objWorkbook = ThisWorkbook\n\n\n&#039;\u524d\u56de\u4f5c\u6210\u3057\u305f\u30af\u30a8\u30ea\u3092\u524a\u9664\u3057\u307e\u3059\u3002\nFor Each Query In objWorkbook.Queries\n    Query.Delete\nNext\n\n&#039;\u6307\u5b9a\u7bc4\u56f2\u306b\u3042\u308b\u8868\u3092\u524a\u9664\u3057\u307e\u3059\u3002\u7bc4\u56f2\u6307\u5b9a\u306f\u9069\u5b9c\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\nRange(&quot;A1:H10&quot;).ClearContents\n\n\n&#039;CSV\u30d5\u30a1\u30a4\u30eb\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u307f\u30af\u30a8\u30ea\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\nobjWorkbook.Queries.Add Name:=strTableName, Formula:= _\n&quot;let&quot; &amp; Chr(13) &amp; &quot;&quot; &amp; Chr(10) &amp; &quot;    \u30bd\u30fc\u30b9 = Csv.Document(File.Contents(&quot;&quot;&quot; &amp; strFilePass &amp; &quot;&quot;&quot;),[Delimiter=&quot;&quot;&quot; &amp; strSplitword &amp; &quot;&quot;&quot;, Columns=&quot; &amp; intColumnum &amp; &quot;, Encoding=932, QuoteStyle=QuoteStyle.None]),&quot; &amp; Chr(13) &amp; &quot;&quot; &amp; Chr(10) &amp; &quot;    \u5909\u66f4\u3055\u308c\u305f\u578b = Table.TransformColumnTypes(\u30bd\u30fc\u30b9,&quot; &amp; strColumn &amp; &quot;),&quot; &amp; Chr(13) &amp; &quot;&quot; &amp; Chr(10) &amp; &quot;    #&quot;&quot;\u540d\u524d\u304c\u5909\u66f4\u3055\u308c\u305f\u5217 &quot;&quot; = Table.RenameColumns(\u5909\u66f4\u3055\u308c\u305f\u578b,&quot; &amp; strChangeColumn &amp; &quot;)&quot; &amp; Chr(13) &amp; &quot;&quot; &amp; Chr(10) &amp; &quot;in&quot; &amp; Chr(13) &amp; &quot;&quot; &amp; Chr(10) &amp; &quot;    #&quot;&quot;\u540d\u524d\u304c\u5909\u66f4\u3055\u308c\u305f\u5217 &quot;&quot;&quot;\n\n\nWith ActiveSheet.ListObjects.Add(SourceType:=0, Source:= _\n    &quot;OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=&quot;&quot;&quot; &amp; strTableName &amp; &quot;&quot;&quot;;Extended Properties=&quot;&quot;&quot;&quot;&quot; _\n    , Destination:=Range(&quot;&quot; &amp; strStartCell &amp; &quot;&quot;)).QueryTable\n    .CommandType = xlCmdSql\n    .CommandText = Array(&quot;SELECT * FROM [&quot; &amp; strTableName &amp; &quot;]&quot;)\n    .PreserveColumnInfo = True\n    .ListObject.DisplayName = strTableName\n    .Refresh BackgroundQuery:=False\nEnd With\n\n\n&#039;&quot;let&quot; &amp; Chr(13) &amp; &quot;&quot; &amp; Chr(10) &amp; &quot; \u30bd\u30fc\u30b9 = Csv.Document(File.Contents(&quot;&quot;&quot; &amp; strFilePass &amp; &quot;&quot;&quot;),[Delimiter=&quot;&quot;,&quot;&quot;, Columns=&quot; &amp; intColumnum &amp; &quot;, Encoding=932, QuoteStyle=QuoteStyle.None]),&quot; &amp; Chr(13) &amp; &quot;&quot; &amp; Chr(10) &amp; &quot; \u5909\u66f4\u3055\u308c\u305f\u578b = Table.TransformColumnTypes(\u30bd\u30fc\u30b9,&quot; &amp; strColumn &amp; &quot;)&quot; &amp; Chr(13) &amp; &quot;&quot; &amp; Chr(10) &amp; &quot;in&quot; &amp; Chr(13) &amp; &quot;&quot; &amp; Chr(10) &amp; &quot;    \u5909\u66f4\u3055\u308c\u305f\u578b&quot;\n\nEnd Sub<\/code><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"VBA%E3%81%AE%E8%AA%AC%E6%98%8E\"><\/span>VBA\u306e\u8aac\u660e<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u524d\u56de\u4f5c\u6210\u3057\u305f\u30af\u30a8\u30ea\u3068\u3001\u6307\u5b9a\u7bc4\u56f2\u306b\u3042\u308b\u8868\u3092\u524a\u9664\u3057\u307e\u3059\u3002<br \/>\n\u540c\u3058\u540d\u524d\u306e\u30af\u30a8\u30ea\u3068\u8868\u304c\u3042\u308b\u3068\u3001VBA\u3092\u518d\u5b9f\u884c\u3057Refresh\u3059\u308b\u3068\u304d\u306b\u30a8\u30e9\u30fc\u3068\u306a\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<div class=\"info\">For Each Query In objWorkbook.Queries<br \/>\nQuery.Delete<br \/>\nNextRange(&#8220;A1:H10&#8221;).ClearContents<\/div>\n<p>Workbook.Queries.Add\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308aCSV\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\u3001\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<div class=\"info\">objWorkbook.Queries.Add Name:=strTableName<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u306f\u3058\u307e\u308a--><\/p>\n<div class=\"balloon5\">\n<div class=\"faceicon\">\n<img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/11\/taka_kao.gif\" alt=\"\u30bf\u30ab\u30d2\u30ed\" width=\"110\" height=\"110\" \/>\n<div class=\"faceiconfont\">\u30bf\u30ab\u30d2\u30ed<\/div>\n<\/div>\n<div class=\"chatting\">\n<div class=\"says\">Worksheet\u3067\u306f\u306a\u304fWorkbook\u306e\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n<\/div>\n<p><!--\u5439\u304d\u51fa\u3057\u7d42\u308f\u308a--><\/p>\n<p>\u623b\u308a\u5024\u3067objWorkbook.Queries\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3057\u3001<br \/>\nFormula\u3067\u30af\u30a8\u30ea\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>Columns\u3067\u5217\u306e\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\">Columns=<\/div>\n<p>Encoding\u3067\u8a00\u8a9e\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u306a\u304a\u3001932\u306f\u65e5\u672c\u8a9e\u306e\u30b7\u30d5\u30c8JIS\u3092\u610f\u5473\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\">Encoding=932<\/div>\n<p>\u4ed6\u306b\u3082<\/p>\n<div class=\"info\">\u30fb\u65e5\u672c\u8a9eEUC\uff1a51932<br \/>\n\u30fb\u65e5\u672c\u8a9eJIS\uff1a50220<br \/>\n\u30fbUTF-8\uff1a65001<br \/>\n\u30fbUTF-16\uff1a1200<\/div>\n<p>\u306a\u3069\u304c\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002<br \/>\n\u8a73\u7d30\u306f\u30c7\u30fc\u30bf\u53d6\u308a\u8fbc\u307f\u6642\u306b\u3067\u308b\u30a6\u30a4\u30b6\u30fc\u30c9\u306e\u5de6\u4e0a\u300c\u5143\u306e\u30d5\u30a1\u30a4\u30eb\u300d\u4e0b\u306e\u30d7\u30eb\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5240\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/09\/083121_2035_temp1.png\" alt=\"\" width=\"772\" height=\"532\" srcset=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/09\/083121_2035_temp1.png 772w, https:\/\/extan.jp\/wp-content\/uploads\/2021\/09\/083121_2035_temp1-300x207.png 300w, https:\/\/extan.jp\/wp-content\/uploads\/2021\/09\/083121_2035_temp1-768x529.png 768w, https:\/\/extan.jp\/wp-content\/uploads\/2021\/09\/083121_2035_temp1-718x495.png 718w\" sizes=\"auto, (max-width: 772px) 100vw, 772px\" \/><\/p>\n<p>\u300c\u5909\u66f4\u3055\u308c\u305f\u578b\u300d\u306e\u5f15\u6570\u306b\u300cTable.TransformColumnTypes\u300d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u6307\u5b9a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u3088\u308b\u8868\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<div class=\"info\">\u5909\u66f4\u3055\u308c\u305f\u578b = Table.TransformColumnTypes<\/div>\n<p>\u300c\u540d\u524d\u304c\u5909\u66f4\u3055\u308c\u305f\u5217\u300d\u306e\u5f15\u6570\u306b\u300cTable.RenameColumns\u300d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308aColumn**\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u8868\u793a\u540d\u304b\u3089\u6307\u5b9a\u3059\u308b\u9805\u76ee\u540d\u3078\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"info\">\u540d\u524d\u304c\u5909\u66f4\u3055\u308c\u305f\u5217 &#8220;&#8221; = Table.RenameColumns<\/div>\n<p>objWorkbook.ActiveSheet.ListObjects.Add\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308a\u3001\u4f5c\u6210\u3057\u305f\u30af\u30a8\u30ea\u3092\u53c2\u7167\u3057\u3001\u8868\u3078\u30c7\u30fc\u30bf\u3092\u633f\u5165\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>SQL\u3067\u5bfe\u8c61\u30af\u30a8\u30ea\u3092\u6307\u5b9a\u3057\u53c2\u7167\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\">.CommandType = xlCmdSql<br \/>\n.CommandText = Array(&#8220;SELECT * FROM [&#8221; &amp; strTableName &amp; &#8220;]&#8221;)<\/div>\n<p>\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5\u30e1\u30bd\u30c3\u30c9\u3067\u8868\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002<\/p>\n<div class=\"info\">.Refresh<\/div>\n<p><script><\/p>\n<p><\/script><\/p>\n<h2><span class=\"ez-toc-section\" id=\"VBA%E3%81%AE%E5%AE%9F%E8%A3%85%E6%89%8B%E9%A0%86\"><\/span>VBA\u306e\u5b9f\u88c5\u624b\u9806<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u5b9f\u88c5\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306fExcel\u5074\u306b\u3053\u306eVBA\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n<p>\u2460Excel\u3092\u65b0\u898f\u306b\u958b\u304d\u3001\u300c\u958b\u767a\u300d\u30bf\u30d6\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u300cVisualBasic\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<br \/>\n\u3082\u3057\u304f\u306f\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30ad\u30fc\u300cAlt\u300d\uff0b\u300cF11\u300d\u3067\u3082OK\u3067\u3059\u3002<\/p>\n<p>\u2461\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\n\u5de6\u30da\u30a4\u30f3\u306eVBAProject\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3001\u300c\u633f\u5165\u300d\u3001\u300c\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<img decoding=\"async\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2019\/05\/050919_1542_VBAFunctio2.png\" alt=\"\" \/>\n<p>\u2462\u53f3\u30da\u30a4\u30f3\u306e\u30a6\u30a4\u30f3\u30c9\u30a6\u306b\u4e0a\u8a18\u306eVBA\u3092\u5165\u529b\u3057\u307e\u3059\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1680\" src=\"https:\/\/extan.jp\/wp-content\/uploads\/2019\/09\/092219_1211_temp22.png\" alt=\"\" width=\"1395\" height=\"879\" \/><\/p>\n<p>\u3053\u3061\u3089\u3067\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"VBA%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B-2\"><\/span>VBA\u3092\u5b9f\u884c\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u3067\u306f\u65e9\u901fVBA\u306e\u5b9f\u884c\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u2460\u300c\u958b\u767a\u300d\u30bf\u30d6\u306e\u300cVBA\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u5b9f\u884c\u3057\u305f\u3044\u30de\u30af\u30ed\u3092\u9078\u629e\u3057\u3001\u300c<strong>\u5b9f\u884c<\/strong>\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p>\u2461\u51e6\u7406\u304c\u3055\u308c\u305f\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u308c\u3070\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n\u203b\u5b8c\u4e86\u30e1\u30c3\u30bb\u30fc\u30b8\u3084\u30b9\u30c6\u30fc\u30bf\u30b9\u7ba1\u7406\u306a\u3069\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u5b9f\u88c5\u3057\u3066\u3082\u3089\u3048\u3070\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><script><\/p>\n<p><\/script><\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E3%81%95%E3%81%84%E3%81%94%E3%81%AB\"><\/span>\u3055\u3044\u3054\u306b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001<\/p>\n<div class=\"endinfo\">\u30fbExcel VBA\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5<\/div>\n<p>\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305f\u3001\u4ed6\u306b\u3082\u4fbf\u5229\u306a\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u3088\u308d\u3057\u3051\u308c\u3070\u3054\u53c2\u7167\u9802\u3051\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Excel VBA\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u307f\u305f\u3044\u3068\u304d\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002 \u3051\u3069\u3001\u305d\u3093\u306a\u4e2d\u3067\u60a9\u3080\u3053\u3068\u306f\u3001 \u30fbExcel VBA\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u3084\u308a\u65b9\u304c\u308f\u304b\u3089\u306a\u3044\u3002 \u30fb&#8230;<\/p>\n","protected":false},"author":1,"featured_media":5211,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,5],"tags":[57,53],"class_list":{"0":"post-5120","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-excelvba","8":"category-excel","9":"tag-pickup","10":"tag-53","11":"article cf"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<meta name=\"description\" content=\"\u30fbExcel VBA\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/extan.jp\/?p=5120\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Excel VBA\u3011\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5\uff01\u8a2d\u5b9a\u3060\u3051\u3067\u5373\u5b9f\u884c\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp\" \/>\n<meta property=\"og:description\" content=\"\u30fbExcel VBA\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/extan.jp\/?p=5120\" \/>\n<meta property=\"og:site_name\" content=\"\u30a8\u30af\u77ed\uff5cExtan.jp\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-30T14:57:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-04T14:41:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/call-19-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"652\" \/>\n\t<meta property=\"og:image:height\" content=\"416\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u30bf\u30ab\u30d2\u30ed@extan\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"7\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/extan.jp\/#website\",\"url\":\"https:\/\/extan.jp\/\",\"name\":\"\u30a8\u30af\u77ed\uff5cExtan.jp\",\"description\":\"\u50cd\u304f\u4eba\u306e\u81ea\u7531\u6642\u9593\u3092\u3064\u304f\u308b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/extan.jp\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/extan.jp\/?p=5120#primaryimage\",\"inLanguage\":\"ja\",\"url\":\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/call-19-1.png\",\"contentUrl\":\"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/call-19-1.png\",\"width\":652,\"height\":416},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/extan.jp\/?p=5120#webpage\",\"url\":\"https:\/\/extan.jp\/?p=5120\",\"name\":\"\u3010Excel VBA\u3011\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5\uff01\u8a2d\u5b9a\u3060\u3051\u3067\u5373\u5b9f\u884c\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp\",\"isPartOf\":{\"@id\":\"https:\/\/extan.jp\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/extan.jp\/?p=5120#primaryimage\"},\"datePublished\":\"2021-08-30T14:57:55+00:00\",\"dateModified\":\"2022-01-04T14:41:50+00:00\",\"author\":{\"@id\":\"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a\"},\"description\":\"\u30fbExcel VBA\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/extan.jp\/?p=5120#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/extan.jp\/?p=5120\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/extan.jp\/?p=5120#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\/\/extan.jp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Excel VBA\u3011\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5\uff01\u8a2d\u5b9a\u3060\u3051\u3067\u5373\u5b9f\u884c\uff01\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a\",\"name\":\"\u30bf\u30ab\u30d2\u30ed@extan\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/extan.jp\/#personlogo\",\"inLanguage\":\"ja\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g\",\"caption\":\"\u30bf\u30ab\u30d2\u30ed@extan\"},\"url\":\"https:\/\/extan.jp\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"description":"\u30fbExcel VBA\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/extan.jp\/?p=5120","og_locale":"ja_JP","og_type":"article","og_title":"\u3010Excel VBA\u3011\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5\uff01\u8a2d\u5b9a\u3060\u3051\u3067\u5373\u5b9f\u884c\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp","og_description":"\u30fbExcel VBA\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002","og_url":"https:\/\/extan.jp\/?p=5120","og_site_name":"\u30a8\u30af\u77ed\uff5cExtan.jp","article_published_time":"2021-08-30T14:57:55+00:00","article_modified_time":"2022-01-04T14:41:50+00:00","og_image":[{"width":652,"height":416,"url":"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/call-19-1.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u30bf\u30ab\u30d2\u30ed@extan","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"7\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/extan.jp\/#website","url":"https:\/\/extan.jp\/","name":"\u30a8\u30af\u77ed\uff5cExtan.jp","description":"\u50cd\u304f\u4eba\u306e\u81ea\u7531\u6642\u9593\u3092\u3064\u304f\u308b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/extan.jp\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ja"},{"@type":"ImageObject","@id":"https:\/\/extan.jp\/?p=5120#primaryimage","inLanguage":"ja","url":"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/call-19-1.png","contentUrl":"https:\/\/extan.jp\/wp-content\/uploads\/2021\/08\/call-19-1.png","width":652,"height":416},{"@type":"WebPage","@id":"https:\/\/extan.jp\/?p=5120#webpage","url":"https:\/\/extan.jp\/?p=5120","name":"\u3010Excel VBA\u3011\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5\uff01\u8a2d\u5b9a\u3060\u3051\u3067\u5373\u5b9f\u884c\uff01 - \u30a8\u30af\u77ed\uff5cExtan.jp","isPartOf":{"@id":"https:\/\/extan.jp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/extan.jp\/?p=5120#primaryimage"},"datePublished":"2021-08-30T14:57:55+00:00","dateModified":"2022-01-04T14:41:50+00:00","author":{"@id":"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a"},"description":"\u30fbExcel VBA\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/extan.jp\/?p=5120#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/extan.jp\/?p=5120"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/extan.jp\/?p=5120#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/extan.jp\/"},{"@type":"ListItem","position":2,"name":"\u3010Excel VBA\u3011\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\uff08CSV\uff09\u3092\u53d6\u308a\u8fbc\u3080\u65b9\u6cd5\uff01\u8a2d\u5b9a\u3060\u3051\u3067\u5373\u5b9f\u884c\uff01"}]},{"@type":"Person","@id":"https:\/\/extan.jp\/#\/schema\/person\/ccb8849fcf749d5f74439b1af7d4df1a","name":"\u30bf\u30ab\u30d2\u30ed@extan","image":{"@type":"ImageObject","@id":"https:\/\/extan.jp\/#personlogo","inLanguage":"ja","url":"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/24a74fef504a714c468411d23f2d1fd451892ffebbba0d84f70d4ce0d489aefb?s=96&d=mm&r=g","caption":"\u30bf\u30ab\u30d2\u30ed@extan"},"url":"https:\/\/extan.jp\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/5120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5120"}],"version-history":[{"count":17,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/5120\/revisions"}],"predecessor-version":[{"id":6998,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/posts\/5120\/revisions\/6998"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=\/wp\/v2\/media\/5211"}],"wp:attachment":[{"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/extan.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}