{"id":5533,"date":"2016-05-26T10:15:47","date_gmt":"2016-05-26T01:15:47","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=5533"},"modified":"2016-05-26T10:15:47","modified_gmt":"2016-05-26T01:15:47","slug":"fsowrite","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/fsowrite\/","title":{"rendered":"TextStream \u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u3080\uff08Write,WriteLine,WriteBlankLines\uff09"},"content":{"rendered":"<h2>Write \u30e1\u30bd\u30c3\u30c9<\/h2>\n<div class=\"m30-l\">\n<p><strong>TextStream \u30d5\u30a1\u30a4\u30eb<\/strong>\u306b\u3001\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u3092\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Write<\/strong> ( <em>string<\/em> )<\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<span class=\"red\"><strong>TextStream \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>string&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u3080\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/>\n<p class=\"caution4\">\u5f15\u6570 <em>string<\/em> \u306b\u6587\u5b57\u5217\u3092\u8907\u6570\u6307\u5b9a\u3059\u308b\u3068\u5404\u6587\u5b57\u5217\u304c\u30b9\u30da\u30fc\u30b9\u3084\u6587\u5b57\u3067\u533a\u5207\u3089\u308c\u305a\u306b\u7d9a\u3051\u3066\u66f8\u304d\u8fbc\u307e\u308c\u307e\u3059\u3002\u6539\u884c\u6587\u5b57\u3084\u6700\u5f8c\u304c\u6539\u884c\u6587\u5b57\u3067\u7d42\u308f\u308b\u6587\u5b57\u5217\u3092\u66f8\u304d\u8fbc\u3080\u5834\u5408\u306f\u3001<strong>WriteLine \u30e1\u30bd\u30c3\u30c9<\/strong>\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n<br \/><br \/>\n<h2>WriteLine \u30e1\u30bd\u30c3\u30c9<\/h2>\n<div class=\"m30-l\">\n<p><strong>TextStream \u30d5\u30a1\u30a4\u30eb<\/strong>\u306b\u3001\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u304a\u3088\u3073\u6539\u884c\u6587\u5b57\u3092\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>WriteLine<\/strong> ( [ <em>string<\/em> ] )<\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<span class=\"red\"><strong>TextStream \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>string&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u3080\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u7701\u7565\u3059\u308b\u3068\u3001\u6539\u884c\u6587\u5b57\u304c\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u307e\u308c\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<\/div>\n<br \/><br \/>\n<h2>WriteBlankLines \u30e1\u30bd\u30c3\u30c9<\/h2>\n<div class=\"m30-l\">\n<p><strong>TextStream \u30d5\u30a1\u30a4\u30eb<\/strong>\u306b\u3001\u6307\u5b9a\u3057\u305f\u6570\u306e\u6539\u884c\u6587\u5b57\u3092\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>WriteBlankLines<\/strong> ( <em>lines<\/em> )<\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<span class=\"red\"><strong>TextStream \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>lines&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u3080\u6539\u884c\u6587\u5b57\u306e\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<\/div>\n<br \/><br \/>\n<h2>TextStream \u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u3080\u4f8b<\/h2>\n<div class=\"m30-l\">\n<h3 id=\"vba_sample\">\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9<\/h3>\n<pre class=\"lang:vb mark:0 decode:true \" title=\"Write WriteLine WriteBlankLines \u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample_Write()\r\n\r\n    Dim fso As New FileSystemObject\r\n    Dim f As TextStream\r\n    Dim str As String\r\n    Dim fname As String\r\n    \r\n    fname = \"C:\\Documents\\mydata5\\test02.txt\"\r\n    Set f = fso.OpenTextFile(fname, ForWriting)\r\n        \r\n    f.Write \"\u3042\u3044\u3046\u3048\u304a\"\r\n    f.Write \"\u304b\u304d\u304f\u3051\u3053\"\r\n    f.WriteBlankLines (5)\r\n    f.WriteLine \"\u3055\u3057\u3059\u305b\u305d\"\r\n    f.WriteLine \"\u305f\u3061\u3064\u3066\u3068\"\r\n    \r\n    f.Close\r\n\r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p><a href=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2016\/05\/fso_wright01.jpg?ssl=1\" rel=\"lightbox[5533]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2016\/05\/fso_wright01.jpg?resize=463%2C292&#038;ssl=1\" alt=\"FSO Write \u30e1\u30bd\u30c3\u30c9\u30fbWriteLine \u30e1\u30bd\u30c3\u30c9\u30fbWriteBlankLines \u30e1\u30bd\u30c3\u30c9\" width=\"463\" height=\"292\" class=\"alignnone size-full wp-image-5534\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2016\/05\/fso_wright01.jpg?w=463&amp;ssl=1 463w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2016\/05\/fso_wright01.jpg?resize=400%2C252&amp;ssl=1 400w\" sizes=\"(max-width: 463px) 100vw, 463px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/><br \/>\n","protected":false},"excerpt":{"rendered":"<p>Write \u30e1\u30bd\u30c3\u30c9 TextStream \u30d5\u30a1\u30a4\u30eb\u306b\u3001\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u3092\u66f8\u304d\u8fbc\u307f &#8230; <\/p>\n","protected":false},"author":1,"featured_media":5534,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[836],"tags":[721,693,722,834,901,63,890,898,891,38],"jetpack_featured_media_url":"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2016\/05\/fso_wright01.jpg?fit=463%2C292&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s4Ye9i-fsowrite","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/5533"}],"collection":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/comments?post=5533"}],"version-history":[{"count":3,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/5533\/revisions"}],"predecessor-version":[{"id":5576,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/5533\/revisions\/5576"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/5534"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=5533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=5533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=5533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}