{"id":598,"date":"2025-03-20T00:33:35","date_gmt":"2025-03-19T15:33:35","guid":{"rendered":"https:\/\/hajidai.com\/excel\/2025\/03\/excel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e5%a4%a7%e5%ae%b9%e9%87%8f%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e7%9e%ac%e6%99%82%e3%81%ab%e5%87%a6%e7%90%86%e3%81%99%e3%82%8b%e3%80%8c\/"},"modified":"2025-03-20T00:33:35","modified_gmt":"2025-03-19T15:33:35","slug":"excel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e5%a4%a7%e5%ae%b9%e9%87%8f%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e7%9e%ac%e6%99%82%e3%81%ab%e5%87%a6%e7%90%86%e3%81%99%e3%82%8b%e3%80%8c","status":"publish","type":"post","link":"https:\/\/hajidai.com\/excel\/2025\/03\/excel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e5%a4%a7%e5%ae%b9%e9%87%8f%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e7%9e%ac%e6%99%82%e3%81%ab%e5%87%a6%e7%90%86%e3%81%99%e3%82%8b%e3%80%8c\/","title":{"rendered":"Excel\u4e0a\u7d1a\u8005\u5fc5\u898b\uff01\u5927\u5bb9\u91cf\u30c7\u30fc\u30bf\u3092\u77ac\u6642\u306b\u51e6\u7406\u3059\u308b\u300c\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u300d\u30c6\u30af\u30cb\u30c3\u30af"},"content":{"rendered":"<h2>Excel\u4e0a\u7d1a\u8005\u304c\u6975\u3081\u308b\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u51e6\u7406<\/h2>\n<h3>\u4e0a\u7d1a\u8005\u5411\u3051\u30de\u30af\u30ed\u30b3\u30fc\u30c9\uff1a\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u306e\u52b9\u7387\u5316<\/h3>\n<p>&#8220;`vba<br \/>\nSub ProcessLargeFile()<br \/>\n    Dim fNum As Integer<br \/>\n    Dim filePath As String<br \/>\n    Dim fileContent As String<\/p>\n<p>    filePath = &#8220;C:\\LargeFile.txt&#8221;<br \/>\n    fNum = FreeFile<\/p>\n<p>    Open filePath For Binary Access Read As #fNum<br \/>\n    fileContent = Space$(LOF(fNum))<br \/>\n    Get #fNum, , fileContent<br \/>\n    Close #fNum<\/p>\n<p>    &#8216; \u3053\u3053\u3067fileContent\u3092\u51e6\u7406<\/p>\n<p>    MsgBox &#8220;\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u5b8c\u4e86&#8221;<br \/>\nEnd Sub<br \/>\n&#8220;`<\/p>\n<p>\u3053\u306e\u30de\u30af\u30ed\u306f\u3001\u5927\u5bb9\u91cf\u30d5\u30a1\u30a4\u30eb\u3092\u52b9\u7387\u7684\u306b\u8aad\u307f\u8fbc\u3080\u305f\u3081\u306e\u57fa\u672c\u7684\u306a\u69cb\u9020\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u306e\u8003\u3048\u65b9\u3092\u5fdc\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u3055\u3089\u306b\u9ad8\u901f\u306a\u51e6\u7406\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>1. \u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u306e\u57fa\u672c<\/h3>\n<p>\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u3068\u306f\u3001\u5927\u5bb9\u91cf\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30e1\u30e2\u30ea\u4e0a\u306b\u76f4\u63a5\u30de\u30c3\u30d4\u30f3\u30b0\u3059\u308b\u6280\u8853\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u66f8\u304d\u304c\u975e\u5e38\u306b\u9ad8\u901f\u306b\u306a\u308a\u307e\u3059\u3002Excel \u30de\u30af\u30ed\u3067\u3053\u306e\u6280\u8853\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u306e\u51e6\u7406\u901f\u5ea6\u3092\u5927\u5e45\u306b\u5411\u4e0a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u901a\u5e38\u306e\u30d5\u30a1\u30a4\u30eb\u8aad\u307f\u8fbc\u307f\u3067\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u3092\u4e00\u5ea6\u306b\u30e1\u30e2\u30ea\u306b\u8aad\u307f\u8fbc\u3080\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u3067\u306f\u5fc5\u8981\u306a\u90e8\u5206\u3060\u3051\u3092\u52b9\u7387\u7684\u306b\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306f\u7279\u306b\u3001\u6570\u30ae\u30ac\u30d0\u30a4\u30c8\u3092\u8d85\u3048\u308b\u3088\u3046\u306a\u5927\u5bb9\u91cf\u30d5\u30a1\u30a4\u30eb\u3092\u6271\u3046\u969b\u306b\u5a01\u529b\u3092\u767a\u63ee\u3057\u307e\u3059\u3002<\/p>\n<h3>2. VBA\u3067\u306e\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u5b9f\u88c5<\/h3>\n<p>Excel\u306e\u30de\u30af\u30ed\u8a00\u8a9e\u3067\u3042\u308bVBA\u3067\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u3092\u5b9f\u88c5\u3059\u308b\u306b\u306f\u3001Windows API\u3092\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4e3b\u306b\u4f7f\u7528\u3059\u308bAPI\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\uff1a<\/p>\n<p>&#8211; CreateFile\uff1a\u30d5\u30a1\u30a4\u30eb\u30cf\u30f3\u30c9\u30eb\u3092\u4f5c\u6210<br \/>\n&#8211; CreateFileMapping\uff1a\u30d5\u30a1\u30a4\u30eb\u30de\u30c3\u30d4\u30f3\u30b0\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210<br \/>\n&#8211; MapViewOfFile\uff1a\u30d5\u30a1\u30a4\u30eb\u30d3\u30e5\u30fc\u3092\u30e1\u30e2\u30ea\u306b\u30de\u30c3\u30d7<\/p>\n<p>\u3053\u308c\u3089\u306eAPI\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u5927\u5bb9\u91cf\u30d5\u30a1\u30a4\u30eb\u3092\u52b9\u7387\u7684\u306b\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305f\u3060\u3057\u3001API\u306e\u4f7f\u7528\u306b\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3001\u9069\u5207\u306b\u30ea\u30bd\u30fc\u30b9\u3092\u89e3\u653e\u3057\u306a\u3044\u3068\u30e1\u30e2\u30ea\u30ea\u30fc\u30af\u306e\u539f\u56e0\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306f\u3001\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u3092\u5b9f\u88c5\u3057\u305fVBA\u30b3\u30fc\u30c9\u306e\u4e00\u4f8b\u3067\u3059\uff1a<\/p>\n<p>&#8220;`vba<br \/>\nPrivate Declare PtrSafe Function CreateFile Lib &#8220;kernel32&#8221; Alias &#8220;CreateFileA&#8221; (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, ByVal lpSecurityAttributes As Long, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long<br \/>\nPrivate Declare PtrSafe Function CreateFileMapping Lib &#8220;kernel32&#8221; Alias &#8220;CreateFileMappingA&#8221; (ByVal hFile As Long, ByVal lpFileMappingAttributes As Long, ByVal flProtect As Long, ByVal dwMaximumSizeHigh As Long, ByVal dwMaximumSizeLow As Long, ByVal lpName As String) As Long<br \/>\nPrivate Declare PtrSafe Function MapViewOfFile Lib &#8220;kernel32&#8221; (ByVal hFileMappingObject As Long, ByVal dwDesiredAccess As Long, ByVal dwFileOffsetHigh As Long, ByVal dwFileOffsetLow As Long, ByVal dwNumberOfBytesToMap As Long) As Long<br \/>\nPrivate Declare PtrSafe Function UnmapViewOfFile Lib &#8220;kernel32&#8221; (lpBaseAddress As Any) As Long<br \/>\nPrivate Declare PtrSafe Function CloseHandle Lib &#8220;kernel32&#8221; (ByVal hObject As Long) As Long<\/p>\n<p>Sub ProcessLargeFileWithMemoryMapping()<br \/>\n    &#8216; API\u306e\u547c\u3073\u51fa\u3057\u3068\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u306e\u30b3\u30fc\u30c9\u3092\u3053\u3053\u306b\u5b9f\u88c5<br \/>\nEnd Sub<br \/>\n&#8220;`<\/p>\n<h3>3. \u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u306e\u6d3b\u7528\u30b7\u30fc\u30f3<\/h3>\n<p>\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b7\u30fc\u30f3\u3067\u7279\u306b\u5a01\u529b\u3092\u767a\u63ee\u3057\u307e\u3059\uff1a<\/p>\n<p>1. \u5927\u5bb9\u91cf\u306eCSV\u30d5\u30a1\u30a4\u30eb\u306e\u9ad8\u901f\u8aad\u307f\u8fbc\u307f<br \/>\n2. \u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u306e\u52b9\u7387\u7684\u306a\u5206\u6790<br \/>\n3. \u8907\u6570\u306eExcel\u30d6\u30c3\u30af\u306b\u5206\u6563\u3057\u305f\u30c7\u30fc\u30bf\u306e\u7d71\u5408\u51e6\u7406<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u6570\u767e\u4e07\u884c\u306e\u30c7\u30fc\u30bf\u3092\u542b\u3080CSV\u30d5\u30a1\u30a4\u30eb\u3092\u901a\u5e38\u306e\u65b9\u6cd5\u3067\u8aad\u307f\u8fbc\u3080\u3068\u3001Excel\u304c\u30d5\u30ea\u30fc\u30ba\u3057\u305f\u308a\u3001\u30e1\u30e2\u30ea\u4e0d\u8db3\u306b\u306a\u3063\u305f\u308a\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u3092\u4f7f\u7528\u3059\u308c\u3070\u3001\u5fc5\u8981\u306a\u90e8\u5206\u3060\u3051\u3092\u52b9\u7387\u7684\u306b\u8aad\u307f\u8fbc\u307f\u3001\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u65e5\u3005\u66f4\u65b0\u3055\u308c\u308b\u5927\u5bb9\u91cf\u306e\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u3092\u5206\u6790\u3059\u308b\u969b\u306b\u3082\u3001\u3053\u306e\u6280\u8853\u306f\u975e\u5e38\u306b\u6709\u7528\u3067\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u5168\u4f53\u3092\u8aad\u307f\u8fbc\u307e\u305a\u306b\u3001\u6700\u65b0\u306e\u90e8\u5206\u3060\u3051\u3092\u7d20\u65e9\u304f\u8aad\u307f\u53d6\u308a\u3001\u5206\u6790\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u8907\u6570\u306eExcel\u30d6\u30c3\u30af\u306b\u5206\u6563\u3057\u305f\u30c7\u30fc\u30bf\u3092\u7d71\u5408\u3059\u308b\u969b\u306b\u3082\u3001\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u5404\u30d5\u30a1\u30a4\u30eb\u3092\u9806\u756a\u306b\u958b\u3044\u3066\u51e6\u7406\u3059\u308b\u5f93\u6765\u306e\u65b9\u6cd5\u3088\u308a\u3082\u3001\u306f\u308b\u304b\u306b\u9ad8\u901f\u306b\u51e6\u7406\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Excel \u30de\u30af\u30ed\u3092\u4f7f\u3063\u3066\u3053\u306e\u3088\u3046\u306a\u9ad8\u5ea6\u306a\u51e6\u7406\u3092\u5b9f\u88c5\u3059\u308b\u3053\u3068\u3067\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u51e6\u7406\u3084\u8907\u96d1\u306a\u696d\u52d9\u30d5\u30ed\u30fc\u306e\u81ea\u52d5\u5316\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u3053\u308c\u3089\u306e\u6280\u8853\u3092\u9069\u5207\u306b\u4f7f\u3044\u3053\u306a\u3059\u306b\u306f\u3001VBA\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3068Windows API\u306b\u95a2\u3059\u308b\u6df1\u3044\u7406\u89e3\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u306f\u3001Excel\u306e\u53ef\u80fd\u6027\u3092\u5927\u304d\u304f\u5e83\u3052\u308b\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002\u3053\u306e\u6280\u8853\u3092\u7fd2\u5f97\u3059\u308b\u3053\u3068\u3067\u3001Excel\u4e0a\u7d1a\u8005\u3068\u3057\u3066\u306e\u30b9\u30ad\u30eb\u3092\u3055\u3089\u306b\u78e8\u304d\u3001\u3088\u308a\u52b9\u7387\u7684\u3067\u9ad8\u5ea6\u306a\u30c7\u30fc\u30bf\u51e6\u7406\u3092\u5b9f\u73fe\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Excel\u4e0a\u7d1a\u8005\u304c\u6975\u3081\u308b\u30e1\u30e2\u30ea\u30de\u30c3\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u51e6\u7406 \u4e0a\u7d1a\u8005\u5411\u3051\u30de\u30af\u30ed\u30b3\u30fc\u30c9\uff1a\u30d5\u30a1\u30a4\u30eb\u51e6\u7406\u306e\u52b9\u7387\u5316 #8220;`vba Sub ProcessLargeFile() Dim fNum As Integer Dim fi<\/p>\n","protected":false},"author":2,"featured_media":597,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-598","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-advanced"],"_links":{"self":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts\/598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/comments?post=598"}],"version-history":[{"count":0,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts\/598\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media\/597"}],"wp:attachment":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media?parent=598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/categories?post=598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/tags?post=598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}