﻿{"id":26,"date":"2011-11-26T15:16:07","date_gmt":"2011-11-26T06:16:07","guid":{"rendered":"http:\/\/fujiitoshiki.com\/improvesociety\/?p=26"},"modified":"2017-04-27T10:40:36","modified_gmt":"2017-04-27T01:40:36","slug":"post-26","status":"publish","type":"post","link":"https:\/\/www.fujiitoshiki.com\/improvesociety\/?p=26","title":{"rendered":"\u300e\u65e5\u672c\u98df\u54c1\u6a19\u6e96\u6210\u5206\u88682010\u300f\u306ePDF\u3092.txt\u30d5\u30a1\u30a4\u30eb\u306b\u5909\u63db\u3059\u308b"},"content":{"rendered":"<div class=\"theContentWrap-ccc\"><p>\u4eca\u56de\u306f\u6587\u90e8\u79d1\u5b66\u7701\u306e\u30b5\u30a4\u30c8\u306b\u3042\u308b\u300e\u65e5\u672c\u98df\u54c1\u6a19\u6e96\u6210\u5206\u88682010\u300f\u306ePDF\u30d5\u30a1\u30a4\u30eb\u304b\u3089\uff0c\u7d041800\u7a2e\u985e\u306b\u53ca\u3076\u98df\u54c1\u6bce\u306e\u6804\u990a\u7d44\u6210\u3092\u62bd\u51fa\u3057\uff0ctxt\u30d5\u30a1\u30a4\u30eb\u306b\u5909\u63db\u3057\u307e\u3059\uff0e<\/p>\n<p><a href=\"\/\/www.mext.go.jp\/b_menu\/shingi\/gijyutu\/gijyutu3\/houkoku\/1298713.htm\" target=\"_blank\">\u8cc7\u6e90\u8abf\u67fb\u5206\u79d1\u4f1a\u5831\u544a\u300c\u65e5\u672c\u98df\u54c1\u6a19\u6e96\u6210\u5206\u88682010\u300d\u306b\u3064\u3044\u3066<\/a><\/p>\n<p><a href=\"\/\/px.a8.net\/svt\/ejp?a8mat=2BU0BK+F4RNAQ+3RK+3T0HG1\" target=\"_blank\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"336\" height=\"280\" alt=\"\" src=\"\/\/www23.a8.net\/svt\/bgt?aid=140808224915&#038;wid=001&#038;eno=01&#038;mid=s00000000488023013000&#038;mc=1\"><\/a><br \/>\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"1\" height=\"1\" src=\"\/\/www10.a8.net\/0.gif?a8mat=2BU0BK+F4RNAQ+3RK+3T0HG1\" alt=\"\"><\/p>\n<p>\u4ee5\u4e0b\u306e\u6d41\u308c\u3067\u51e6\u7406\u3092\u884c\u3044\u307e\u3059\uff0e<\/p>\n<ol>\n<li>PDF\u30d5\u30a1\u30a4\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/li>\n<li>\u30c6\u30ad\u30b9\u30c8\u3092\u30b3\u30d4\u30fc\u3059\u308b<\/li>\n<li>EXCEL\u306b\u8cbc\u4ed8\u3051\u308b<\/li>\n<li>VBA\u306b\u3088\u308b\u51e6\u7406<\/li>\n<\/ol>\n<h3>1. PDF\u30d5\u30a1\u30a4\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/h3>\n<p>\u4e0a\u8a18\u30ea\u30f3\u30af\u5148\u306b\u3042\u308bPDF\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\uff0e\u30d5\u30a1\u30a4\u30eb\u540d\u306f1299012_1.pdf\u304b\u30891299012_18.pdf\u307e\u3067\u3067\u3059\uff0e<\/p>\n<p><a href=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig01.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig01-266x300.jpg\" alt=\"\" title=\"20111126Fig01\" width=\"266\" height=\"300\" class=\"alignnone size-medium wp-image-990\" srcset=\"https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig01-266x300.jpg 266w, https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig01-910x1024.jpg 910w, https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig01.jpg 960w\" sizes=\"auto, (max-width: 266px) 85vw, 266px\" \/><\/a><\/p>\n<h3>2. \u30c6\u30ad\u30b9\u30c8\u3092\u30b3\u30d4\u30fc\u3059\u308b<\/h3>\n<p>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u5185\u306e\u5168\u30c6\u30ad\u30b9\u30c8\u3092\u9078\u629e\u3059\u308b\u306b\u306f\uff0c\u8868\u793a\uff0f\u30da\u30fc\u30b8\u8868\u793a\uff0f<strong>\u5358\u4e00\u30da\u30fc\u30b8\u4ee5\u5916<\/strong>\u306b\u3057\u3066\u4e0b\u3055\u3044\uff0e\u305d\u306e\u4e0a\u3067\u300e\u5168\u3066\u3092\u9078\u629e\u300f\u3057\u3066\u30b3\u30d4\u30fc\u3057\u307e\u3059\uff0e\u5358\u4e00\u30da\u30fc\u30b8\u8868\u793a\u3067\u3059\u3068\uff0c\u8868\u793a\u3057\u3066\u3044\u308b\u30da\u30fc\u30b8\u3060\u3051\u306e\u30c6\u30ad\u30b9\u30c8\u304c\u9078\u629e\u3055\u308c\u307e\u3059\uff0e<br \/> <a href=\"\/\/help.adobe.com\/ja_JP\/Reader\/8.0\/WS58a04a822e3e50102bd615109794195ff-7ee5.html\">\u30c6\u30ad\u30b9\u30c8\u306e\u9078\u629e\u304a\u3088\u3073\u30b3\u30d4\u30fc<\/a><\/p>\n<p><a href=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig02.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig02-300x168.jpg\" alt=\"\" title=\"20111126Fig02\" width=\"300\" height=\"168\" class=\"alignnone size-medium wp-image-991\" srcset=\"https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig02-300x168.jpg 300w, https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig02-1024x576.jpg 1024w, https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig02.jpg 1920w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<h3>3. EXCEL\u306b\u8cbc\u4ed8\u3051\u308b<\/h3>\n<p>\u8cbc\u308a\u4ed8\u3051\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\uff0f\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u30a6\u30a3\u30b6\u30fc\u30c9\u3092\u4f7f\u7528\u3092\u9078\u629e\u3057\u307e\u3059\uff0e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u30a6\u30a3\u30b6\u30fc\u30c91\/3\u3067\u306f\u5143\u306e\u30c7\u30fc\u30bf\u5f62\u5f0f\u3067\u300e\u30ab\u30f3\u30de\u3084\u30bf\u30d6\u306a\u3069\u306e\u533a\u5207\u308a\u6587\u5b57\u306b\u3088\u3063\u3066\u30d5\u30a3\u30fc\u30eb\u30c9\u3054\u3068\u306b\u533a\u5207\u3089\u308c\u305f\u30c7\u30fc\u30bf\u300f\u3092\u9078\u629e\u3057\u307e\u3059\uff0e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u30a6\u30a3\u30b6\u30fc\u30c92\/3\u3067\u306f\u7279\u306b\u5909\u66f4\u306a\u304f\u6b21\u3078\u9032\u307f\u307e\u3059\uff0e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u30a6\u30a3\u30b6\u30fc\u30c93\/3\u3067\u306f\u6700\u521d\u306e\u30ab\u30e9\u30e0\u306e\u5217\u306e\u30c7\u30fc\u30bf\u5f62\u5f0f\u306e\u307f\u300e\u6587\u5b57\u5217\u300f\u306b\u5909\u66f4\u3057\u3066\u5b8c\u4e86\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\uff0e<\/p>\n<p><a href=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig031.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig031.jpg\" alt=\"\" title=\"20111126Fig03\" width=\"246\" height=\"102\" class=\"alignnone size-full wp-image-996\" \/><\/a><br \/>\n<a href=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig041.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig041-300x183.jpg\" alt=\"\" title=\"20111126Fig04\" width=\"300\" height=\"183\" class=\"alignnone size-medium wp-image-997\" srcset=\"https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig041-300x183.jpg 300w, https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig041.jpg 646w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><br \/>\n<a href=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig051.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig051-300x183.jpg\" alt=\"\" title=\"20111126Fig05\" width=\"300\" height=\"183\" class=\"alignnone size-medium wp-image-998\" srcset=\"https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig051-300x183.jpg 300w, https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig051.jpg 646w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><br \/>\n<a href=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig061.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig061-300x183.jpg\" alt=\"\" title=\"20111126Fig06\" width=\"300\" height=\"183\" class=\"alignnone size-medium wp-image-999\" srcset=\"https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig061-300x183.jpg 300w, https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig061.jpg 646w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<h3>4. VBA\u306b\u3088\u308b\u51e6\u7406<\/h3>\n<p>Alt+F11\u30ad\u30fc\u3092\u62bc\u4e0b\u3057\u3066VBE\u3092\u8d77\u52d5\u3057\u307e\u3059\uff0e\u633f\u5165\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u9078\u629e\u3057\uff0c\u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u8cbc\u308a\u4ed8\u3051\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:vb decode:true \" >\r\nOption Explicit\r\nSub Procedure1()\r\nDim mySht           As Worksheet\r\nDim myAr1           As Variant\r\nDim myAr2           As Variant\r\nDim i               As Long\r\nDim j               As Long\r\nDim k               As Long\r\nDim myAr(1878, 53)  As String\r\nDim RegEx1          As Object\r\nDim Match1          As Object\r\nDim Matches1        As Object\r\nDim strPtn1         As String\r\nDim tempStr         As String\r\nDim RegEx2          As Object\r\nDim Match2          As Object\r\nDim Matches2        As Object\r\nDim strPtn2         As String\r\nSet mySht = ActiveSheet\r\nSet myAr1 = Application.Intersect(mySht.UsedRange, mySht.Range(\"A:B\"))\r\nSet myAr2 = mySht.UsedRange\r\nSet RegEx1 = CreateObject(\"VBScript.RegExp\")\r\nSet RegEx2 = CreateObject(\"VBScript.RegExp\")\r\nstrPtn2 = \"^[0-9]+(\\.[0-9]*)?\"\r\ni = 0\r\nFor k = 1 To myAr1.Rows.Count\r\n    If Len(myAr1.Cells(k, 1).Value) = 5 And _\r\n        myAr1.Cells(k, 1).Value >= \"01001\" And _\r\n        myAr1.Cells(k, 1).Value <= \"18016\" And _\r\n        myAr1.Cells(k, 2) <> \"\uff08\u6b20\u756a\uff09\" Then\r\n        myAr(i, 0) = myAr2.Cells(k, 1)\r\n        strPtn1 = \"^[0-9]+$\"\r\n        RegEx1.Pattern = strPtn1\r\n        RegEx1.IgnoreCase = True\r\n        RegEx1.Global = True\r\n        Set Matches1 = RegEx1.Execute(myAr2.Cells(k, 2))\r\n        If Matches1.Count > 0 Then\r\n            tempStr = myAr2.Cells(k, 2) &amp; myAr2.Cells(k, 3)\r\n            strPtn1 = \"[^0-9][0-9]+$\"\r\n            RegEx1.Pattern = strPtn1\r\n            RegEx1.IgnoreCase = True\r\n            RegEx1.Global = True\r\n            Set Matches1 = RegEx1.Execute(tempStr)\r\n            If Matches1.Count > 0 Then\r\n                Set Match1 = Matches1.Item(Matches1.Count - 1)\r\n                myAr(i, 1) = Left(tempStr, Match1.firstindex + 1)\r\n                myAr(i, 2) = Mid(tempStr, Match1.firstindex + 2)\r\n                For j = 3 To 52\r\n                    Select Case True\r\n                    Case myAr2.Cells(k, j + 1).Value = \"-\"\r\n                        myAr(i, j) = 0\r\n                    Case myAr2.Cells(k, j + 1).Value = \"Tr\"\r\n                        myAr(i, j) = 0\r\n                    Case myAr2.Cells(k, j + 1).Value = \"(Tr)\"\r\n                        myAr(i, j) = 0\r\n                    Case myAr2.Cells(k, j + 1).Value = \"(0)\"\r\n                        myAr(i, j) = 0\r\n                    Case Else\r\n                        myAr(i, j) = myAr2.Cells(k, j + 1).Value\r\n                    End Select\r\n                Next j\r\n                RegEx2.Pattern = strPtn2\r\n                RegEx2.IgnoreCase = True\r\n                RegEx2.Global = True\r\n                Set Matches2 = RegEx2.Execute(myAr2.Cells(k, 54))\r\n                On Error Resume Next\r\n                Set Match2 = Matches2.Item(0)\r\n                On Error GoTo 0\r\n                myAr(i, 53) = Match2.Value\r\n            Else\r\n                For j = 1 To 52\r\n                    Select Case True\r\n                    Case myAr2.Cells(k, j + 1).Value = \"-\"\r\n                        myAr(i, j) = 0\r\n                    Case myAr2.Cells(k, j + 1).Value = \"Tr\"\r\n                        myAr(i, j) = 0\r\n                    Case myAr2.Cells(k, j + 1).Value = \"(Tr)\"\r\n                        myAr(i, j) = 0\r\n                    Case myAr2.Cells(k, j + 1).Value = \"(0)\"\r\n                        myAr(i, j) = 0\r\n                    Case Else\r\n                        myAr(i, j) = myAr2.Cells(k, j + 1).Value\r\n                    End Select\r\n                Next j\r\n                    RegEx2.Pattern = strPtn2\r\n                    RegEx2.IgnoreCase = True\r\n                    RegEx2.Global = True\r\n                    Set Matches2 = RegEx2.Execute(myAr2.Cells(k, 54))\r\n                    On Error Resume Next\r\n                    Set Match2 = Matches2.Item(0)\r\n                    On Error GoTo 0\r\n                    myAr(i, 53) = Match2.Value\r\n            End If\r\n        Else\r\n            strPtn1 = \"[^0-9][0-9]+$\"\r\n            RegEx1.Pattern = strPtn1\r\n            RegEx1.IgnoreCase = True\r\n            RegEx1.Global = True\r\n            Set Matches1 = RegEx1.Execute(myAr2.Cells(k, 2))\r\n            If Matches1.Count > 0 Then\r\n                Set Match1 = Matches1.Item(Matches1.Count - 1)\r\n                myAr(i, 1) = Left(myAr2.Cells(k, 2), Match1.firstindex + 1)\r\n                myAr(i, 2) = Mid(myAr2.Cells(k, 2), Match1.firstindex + 2)\r\n                For j = 3 To 52\r\n                    Select Case True\r\n                    Case myAr2.Cells(k, j).Value = \"-\"\r\n                        myAr(i, j) = 0\r\n                    Case myAr2.Cells(k, j).Value = \"Tr\"\r\n                        myAr(i, j) = 0\r\n                    Case myAr2.Cells(k, j).Value = \"(Tr)\"\r\n                        myAr(i, j) = 0\r\n                    Case myAr2.Cells(k, j).Value = \"(0)\"\r\n                        myAr(i, j) = 0\r\n                    Case Else\r\n                        myAr(i, j) = myAr2.Cells(k, j).Value\r\n                    End Select\r\n                Next j\r\n                RegEx2.Pattern = strPtn2\r\n                RegEx2.IgnoreCase = True\r\n                RegEx2.Global = True\r\n                Set Matches2 = RegEx2.Execute(myAr2.Cells(k, 53))\r\n                On Error Resume Next\r\n                Set Match2 = Matches2.Item(0)\r\n                On Error GoTo 0\r\n                myAr(i, 53) = Match2.Value\r\n            Else\r\n                For j = 1 To 52\r\n                    Select Case True\r\n                    Case myAr2.Cells(k, j + 1).Value = \"-\"\r\n                        myAr(i, j) = 0\r\n                    Case myAr2.Cells(k, j + 1).Value = \"Tr\"\r\n                        myAr(i, j) = 0\r\n                    Case myAr2.Cells(k, j + 1).Value = \"(Tr)\"\r\n                        myAr(i, j) = 0\r\n                    Case myAr2.Cells(k, j + 1).Value = \"(0)\"\r\n                        myAr(i, j) = 0\r\n                    Case Else\r\n                        myAr(i, j) = myAr2.Cells(k, j + 1).Value\r\n                    End Select\r\n                Next j\r\n                    RegEx2.Pattern = strPtn2\r\n                    RegEx2.IgnoreCase = True\r\n                    RegEx2.Global = True\r\n                    Set Matches2 = RegEx2.Execute(myAr2.Cells(k, 54))\r\n                    On Error Resume Next\r\n                    Set Match2 = Matches2.Item(0)\r\n                    On Error GoTo 0\r\n                    myAr(i, 53) = Match2.Value\r\n            End If\r\n        End If\r\n    Else\r\n        i = i - 1\r\n    End If\r\n    i = i + 1\r\nNext k\r\nSet mySht = Worksheets.Add\r\nWith mySht\r\n    .Name = myAr2.Cells(1, 1).Value &amp; myAr2.Cells(1, 2).Value\r\n    .Range(\"A1:BB1878\").Value = myAr\r\nEnd With\r\nSet mySht = Nothing\r\nSet myAr1 = Nothing\r\nSet myAr2 = Nothing\r\nSet RegEx1 = Nothing\r\nSet Match1 = Nothing\r\nSet Matches1 = Nothing\r\nSet RegEx2 = Nothing\r\nSet Match2 = Nothing\r\nSet Matches2 = Nothing\r\nEnd Sub\r\n<\/pre>\n<p><a href=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig07.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig07-266x300.jpg\" alt=\"\" title=\"20111126Fig07\" width=\"266\" height=\"300\" class=\"alignnone size-medium wp-image-1000\" srcset=\"https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig07-266x300.jpg 266w, https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig07-910x1024.jpg 910w, https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/20111126Fig07.jpg 960w\" sizes=\"auto, (max-width: 266px) 85vw, 266px\" \/><\/a><\/p>\n<p>\u4ee5\u4e0a\u306e\u51e6\u7406\u3092PDF\u30d5\u30a1\u30a4\u30eb\u306e\u6570\u3060\u3051\u7e70\u308a\u8fd4\u3057\u307e\u3059\uff0e\u66f4\u306b\u8ffd\u52a0\u3055\u308c\u305f\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u4ee5\u5916\u306e\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3092\u524a\u9664\u3057\uff0c\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u3066.txt\u30d5\u30a1\u30a4\u30eb\u306b\u3059\u3079\u3066\u306e\u30ec\u30b3\u30fc\u30c9\u3092\u51fa\u529b\u3057\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:vb decode:true \" >\r\nSub AllSheets_to_TextFile()\r\nDim myBook          As Workbook\r\nDim mySht           As Worksheet\r\nDim tmpSht          As Worksheet\r\nDim myRng           As Range\r\nDim myAr(1877, 53)  As String\r\nDim tempAr          As Variant\r\nDim i               As Long\r\nDim j               As Long\r\nDim k               As Long\r\nDim GOF             As Variant\r\nDim RegExp          As Object\r\nDim Matches         As Object\r\nDim Match           As Object\r\nDim strPtn          As String\r\nSet RegExp = CreateObject(\"VBScript.RegExp\")\r\nstrPtn = \"\\\\\"\r\nk = 0\r\nFor Each tmpSht In Worksheets\r\n    Set myRng = tmpSht.Range(\"A1\").CurrentRegion\r\n    tempAr = myRng\r\n    For i = LBound(tempAr) To UBound(tempAr)\r\n        For j = LBound(tempAr, 2) To UBound(tempAr, 2)\r\n            myAr(k, j - 1) = tempAr(i, j)\r\n        Next j\r\n        k = k + 1\r\n    Next i\r\nNext tmpSht\r\nGOF = Application.GetOpenFilename(FileFilter:=\"PDF file,*.pdf\", _\r\n                                  Title:=\"Select PDF file\", _\r\n                                  MultiSelect:=False)\r\nIf TypeName(GOF) = \"Boolean\" Then Exit Sub\r\nGOF = Left(GOF, Len(GOF) - 4) &amp; \".txt\"\r\nWith RegExp\r\n    .Pattern = strPtn\r\n    .IgnoreCase = True\r\n    .Global = True\r\nEnd With\r\nSet Matches = RegExp.Execute(GOF)\r\nGOF = Left(GOF, Matches.Item(Matches.Count - 1).firstindex) &amp; \"\\M_FOODS.txt\"\r\nSet mySht = Worksheets.Add\r\nWith mySht\r\n    .Name = \"M_FOODS\"\r\n    .Range(\"A1:BB1878\") = myAr\r\n    .Move\r\nEnd With\r\nActiveWorkbook.SaveAs Filename:=GOF, _\r\n                      FileFormat:=xlText, _\r\n                      CreateBackup:=False\r\nSet myBook = ActiveWorkbook\r\nApplication.DisplayAlerts = False\r\nmyBook.Close\r\nApplication.DisplayAlerts = True\r\nSet Match = Nothing\r\nSet Matches = Nothing\r\nSet RegExp = Nothing\r\nSet myRng = Nothing\r\nSet mySht = Nothing\r\nSet tmpSht = Nothing\r\nSet myBook = Nothing\r\nEnd Sub\r\n<\/pre>\n<p>\u306a\u304a\uff0c\u6587\u90e8\u79d1\u5b66\u7701\u306f\u8457\u4f5c\u6a29\u3092\u7406\u7531\u306b\u30c7\u30fc\u30bf\u306e\u8907\u88fd\u3092\u884c\u3046\u969b\u306b\u306f\u9023\u7d61\u3059\u308b\u3088\u3046\u9023\u7d61\u5148\u3092\u793a\u3057\u3066\u3044\u307e\u3059\uff0e\u3053\u306e\u8a18\u4e8b\u3092\u66f8\u3044\u305f2011\u5e7411\u670826\u65e5\u6642\u70b9\u3067\u306f\u307e\u3060\u9023\u7d61\u3057\u3066\u304a\u308a\u307e\u305b\u3093\u306e\u3067\uff0c\u3084\u308a\u65b9\u3060\u3051\u516c\u958b\u3057\u307e\u3059\uff0e<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306f\u6587\u90e8\u79d1\u5b66\u7701\u306e\u30b5\u30a4\u30c8\u306b\u3042\u308b\u300e\u65e5\u672c\u98df\u54c1\u6a19\u6e96\u6210\u5206\u88682010\u300f\u306ePDF\u30d5\u30a1\u30a4\u30eb\u304b\u3089\uff0c\u7d041800\u7a2e\u985e\u306b\u53ca\u3076\u98df\u54c1\u6bce\u306e\u6804\u990a\u7d44\u6210\u3092\u62bd\u51fa\u3057\uff0ctxt\u30d5\u30a1\u30a4\u30eb\u306b\u5909\u63db\u3057\u307e\u3059\uff0e \u8cc7\u6e90\u8abf\u67fb\u5206\u79d1\u4f1a\u5831\u544a\u300c\u65e5\u672c\u98df\u54c1\u6a19\u6e96\u6210\u5206\u88682010\u300d\u306b\u3064\u3044\u3066 \u4ee5\u4e0b &hellip; <a href=\"https:\/\/www.fujiitoshiki.com\/improvesociety\/?p=26\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u300e\u65e5\u672c\u98df\u54c1\u6a19\u6e96\u6210\u5206\u88682010\u300f\u306ePDF\u3092.txt\u30d5\u30a1\u30a4\u30eb\u306b\u5909\u63db\u3059\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":6026,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[6,4],"tags":[295,279,306,305],"class_list":["post-26","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel","category-nutrition","tag-295","tag-279","tag-306","tag-305"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26"}],"version-history":[{"count":36,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts\/26\/revisions"}],"predecessor-version":[{"id":7701,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts\/26\/revisions\/7701"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/media\/6026"}],"wp:attachment":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}