[{"data":1,"prerenderedAt":1248},["ShallowReactive",2],{"content-query-xMRT6oJ5D2":3,"navigation":900},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"body":11,"_type":893,"_id":894,"_source":895,"_file":896,"_stem":897,"_extension":898,"sitemap":899},"/document/io/csv-format","io",false,"","CSV形式","CSV（カンマ区切り値）ファイルからのデータ読み込みは、ReoGridでよく行われる操作です。ワークブックと個別のワークシートの両方がこの機能をサポートしており、それぞれCSVデータの扱い方が若干異なります。","2014-12-22",{"type":12,"children":13,"toc":884},"root",[14,21,28,33,53,67,130,145,151,156,174,179,457,462,513,524,529,550,557,562,661,666,678,781,786,791,803,873,878],{"type":15,"tag":16,"props":17,"children":18},"element","p",{},[19],{"type":20,"value":9},"text",{"type":15,"tag":22,"props":23,"children":25},"h3",{"id":24},"ワークブックへのcsv読み込み",[26],{"type":20,"value":27},"ワークブックへのCSV読み込み",{"type":15,"tag":16,"props":29,"children":30},{},[31],{"type":20,"value":32},"ReoGridでCSVファイルをワークブックに読み込む場合：",{"type":15,"tag":34,"props":35,"children":36},"ul",{},[37,43,48],{"type":15,"tag":38,"props":39,"children":40},"li",{},[41],{"type":20,"value":42},"CSVデータがワークブックに入力され、CSVファイルで構造化されたコンテンツでセルが埋められます。",{"type":15,"tag":38,"props":44,"children":45},{},[46],{"type":20,"value":47},"ワークブック内の既存のワークシートはすべて削除され、新しく読み込まれたCSVデータに合わせてワークブックがリセットされます。",{"type":15,"tag":38,"props":49,"children":50},{},[51],{"type":20,"value":52},"この方法は、CSVファイルのデータで新しく始めたい場合、つまりワークブック内の既存のコンテンツを置き換えたい場合に適しています。",{"type":15,"tag":16,"props":54,"children":55},{},[56,58,65],{"type":20,"value":57},"CSVファイルをワークブックに読み込むには、",{"type":15,"tag":59,"props":60,"children":62},"code",{"className":61},[],[63],{"type":20,"value":64},"Load",{"type":20,"value":66},"メソッドを使用し、ファイル形式をCSVに指定します。",{"type":15,"tag":68,"props":69,"children":73},"pre",{"className":70,"code":71,"language":72,"meta":7,"style":7},"language-cs shiki shiki-themes github-light github-dark github-light","grid.Load(\"C:\\\\mypath\\\\data.csv\", IO.FileFormat.CSV);\n","cs",[74],{"type":15,"tag":59,"props":75,"children":76},{"__ignoreMap":7},[77],{"type":15,"tag":78,"props":79,"children":82},"span",{"class":80,"line":81},"line",1,[83,89,94,99,105,111,116,120,125],{"type":15,"tag":78,"props":84,"children":86},{"style":85},"--shiki-light:#24292E;--shiki-dark:#E1E4E8;--shiki-default:#24292E",[87],{"type":20,"value":88},"grid.",{"type":15,"tag":78,"props":90,"children":92},{"style":91},"--shiki-light:#6F42C1;--shiki-dark:#B392F0;--shiki-default:#6F42C1",[93],{"type":20,"value":64},{"type":15,"tag":78,"props":95,"children":96},{"style":85},[97],{"type":20,"value":98},"(",{"type":15,"tag":78,"props":100,"children":102},{"style":101},"--shiki-light:#032F62;--shiki-dark:#9ECBFF;--shiki-default:#032F62",[103],{"type":20,"value":104},"\"C:",{"type":15,"tag":78,"props":106,"children":108},{"style":107},"--shiki-light:#005CC5;--shiki-dark:#79B8FF;--shiki-default:#005CC5",[109],{"type":20,"value":110},"\\\\",{"type":15,"tag":78,"props":112,"children":113},{"style":101},[114],{"type":20,"value":115},"mypath",{"type":15,"tag":78,"props":117,"children":118},{"style":107},[119],{"type":20,"value":110},{"type":15,"tag":78,"props":121,"children":122},{"style":101},[123],{"type":20,"value":124},"data.csv\"",{"type":15,"tag":78,"props":126,"children":127},{"style":85},[128],{"type":20,"value":129},", IO.FileFormat.CSV);\n",{"type":15,"tag":131,"props":132,"children":133},"blockquote",{},[134],{"type":15,"tag":16,"props":135,"children":136},{},[137,143],{"type":15,"tag":138,"props":139,"children":140},"strong",{},[141],{"type":20,"value":142},"注意:",{"type":20,"value":144}," CSV形式は複数のワークシートをサポートしていないため、ワークブック内の既存のワークシートはすべて削除され、CSVコンテンツを保持する新しいワークシートが作成されます。ファイルからコンテンツが読み込まれた場合、ファイル名が自動的にシート名として使用されます。",{"type":15,"tag":22,"props":146,"children":148},{"id":147},"ワークシートへのcsv読み込み",[149],{"type":20,"value":150},"ワークシートへのCSV読み込み",{"type":15,"tag":16,"props":152,"children":153},{},[154],{"type":20,"value":155},"特定のワークシートにCSVファイルを読み込む場合は、動作が若干異なります。",{"type":15,"tag":34,"props":157,"children":158},{},[159,164,169],{"type":15,"tag":38,"props":160,"children":161},{},[162],{"type":20,"value":163},"指定された開始セルまたはデフォルトでは左上のセルから、CSVファイルのデータでワークシートが埋められます。",{"type":15,"tag":38,"props":165,"children":166},{},[167],{"type":20,"value":168},"この操作はワークブック内の他のワークシートには影響せず、対象のワークシートのコンテンツのみが更新されます。",{"type":15,"tag":38,"props":170,"children":171},{},[172],{"type":20,"value":173},"この方法は、ワークブック内の他のデータに影響を与えずに、既存のワークシートにデータを更新または追加する場合に最適です。",{"type":15,"tag":16,"props":175,"children":176},{},[177],{"type":20,"value":178},"CSVファイルをワークシートに読み込むには、以下のメソッドのいずれかを使用します。",{"type":15,"tag":68,"props":180,"children":182},{"className":70,"code":181,"language":72,"meta":7,"style":7},"// Load from stream\nsheet.LoadCSV(Stream s);\n\n// Load from file\nsheet.LoadCSV(string path);\n\n// Load from stream and convert string by specified encoding\nsheet.LoadCSV(Stream s, Encoding encoding = null);\n\n// Load from path and convert string by specified encoding\nsheet.LoadCSV(string path, Encoding encoding = null);\n\n// Load from a stream by specifying autoSpread, bufferLines, and encoding\nsheet.LoadCSV(Stream stream, bool autoSpread = true, int bufferLines = 10, Encoding encoding = null);\n",[183],{"type":15,"tag":59,"props":184,"children":185},{"__ignoreMap":7},[186,195,214,224,233,260,268,277,309,317,326,363,371,380],{"type":15,"tag":78,"props":187,"children":188},{"class":80,"line":81},[189],{"type":15,"tag":78,"props":190,"children":192},{"style":191},"--shiki-light:#6A737D;--shiki-dark:#6A737D;--shiki-default:#6A737D",[193],{"type":20,"value":194},"// Load from stream\n",{"type":15,"tag":78,"props":196,"children":198},{"class":80,"line":197},2,[199,204,209],{"type":15,"tag":78,"props":200,"children":201},{"style":85},[202],{"type":20,"value":203},"sheet.",{"type":15,"tag":78,"props":205,"children":206},{"style":91},[207],{"type":20,"value":208},"LoadCSV",{"type":15,"tag":78,"props":210,"children":211},{"style":85},[212],{"type":20,"value":213},"(Stream s);\n",{"type":15,"tag":78,"props":215,"children":217},{"class":80,"line":216},3,[218],{"type":15,"tag":78,"props":219,"children":221},{"emptyLinePlaceholder":220},true,[222],{"type":20,"value":223},"\n",{"type":15,"tag":78,"props":225,"children":227},{"class":80,"line":226},4,[228],{"type":15,"tag":78,"props":229,"children":230},{"style":191},[231],{"type":20,"value":232},"// Load from file\n",{"type":15,"tag":78,"props":234,"children":236},{"class":80,"line":235},5,[237,241,245,249,255],{"type":15,"tag":78,"props":238,"children":239},{"style":85},[240],{"type":20,"value":203},{"type":15,"tag":78,"props":242,"children":243},{"style":91},[244],{"type":20,"value":208},{"type":15,"tag":78,"props":246,"children":247},{"style":85},[248],{"type":20,"value":98},{"type":15,"tag":78,"props":250,"children":252},{"style":251},"--shiki-light:#D73A49;--shiki-dark:#F97583;--shiki-default:#D73A49",[253],{"type":20,"value":254},"string",{"type":15,"tag":78,"props":256,"children":257},{"style":85},[258],{"type":20,"value":259}," path);\n",{"type":15,"tag":78,"props":261,"children":263},{"class":80,"line":262},6,[264],{"type":15,"tag":78,"props":265,"children":266},{"emptyLinePlaceholder":220},[267],{"type":20,"value":223},{"type":15,"tag":78,"props":269,"children":271},{"class":80,"line":270},7,[272],{"type":15,"tag":78,"props":273,"children":274},{"style":191},[275],{"type":20,"value":276},"// Load from stream and convert string by specified encoding\n",{"type":15,"tag":78,"props":278,"children":280},{"class":80,"line":279},8,[281,285,289,294,299,304],{"type":15,"tag":78,"props":282,"children":283},{"style":85},[284],{"type":20,"value":203},{"type":15,"tag":78,"props":286,"children":287},{"style":91},[288],{"type":20,"value":208},{"type":15,"tag":78,"props":290,"children":291},{"style":85},[292],{"type":20,"value":293},"(Stream s, Encoding encoding ",{"type":15,"tag":78,"props":295,"children":296},{"style":251},[297],{"type":20,"value":298},"=",{"type":15,"tag":78,"props":300,"children":301},{"style":107},[302],{"type":20,"value":303}," null",{"type":15,"tag":78,"props":305,"children":306},{"style":85},[307],{"type":20,"value":308},");\n",{"type":15,"tag":78,"props":310,"children":312},{"class":80,"line":311},9,[313],{"type":15,"tag":78,"props":314,"children":315},{"emptyLinePlaceholder":220},[316],{"type":20,"value":223},{"type":15,"tag":78,"props":318,"children":320},{"class":80,"line":319},10,[321],{"type":15,"tag":78,"props":322,"children":323},{"style":191},[324],{"type":20,"value":325},"// Load from path and convert string by specified encoding\n",{"type":15,"tag":78,"props":327,"children":329},{"class":80,"line":328},11,[330,334,338,342,346,351,355,359],{"type":15,"tag":78,"props":331,"children":332},{"style":85},[333],{"type":20,"value":203},{"type":15,"tag":78,"props":335,"children":336},{"style":91},[337],{"type":20,"value":208},{"type":15,"tag":78,"props":339,"children":340},{"style":85},[341],{"type":20,"value":98},{"type":15,"tag":78,"props":343,"children":344},{"style":251},[345],{"type":20,"value":254},{"type":15,"tag":78,"props":347,"children":348},{"style":85},[349],{"type":20,"value":350}," path, Encoding encoding ",{"type":15,"tag":78,"props":352,"children":353},{"style":251},[354],{"type":20,"value":298},{"type":15,"tag":78,"props":356,"children":357},{"style":107},[358],{"type":20,"value":303},{"type":15,"tag":78,"props":360,"children":361},{"style":85},[362],{"type":20,"value":308},{"type":15,"tag":78,"props":364,"children":366},{"class":80,"line":365},12,[367],{"type":15,"tag":78,"props":368,"children":369},{"emptyLinePlaceholder":220},[370],{"type":20,"value":223},{"type":15,"tag":78,"props":372,"children":374},{"class":80,"line":373},13,[375],{"type":15,"tag":78,"props":376,"children":377},{"style":191},[378],{"type":20,"value":379},"// Load from a stream by specifying autoSpread, bufferLines, and encoding\n",{"type":15,"tag":78,"props":381,"children":383},{"class":80,"line":382},14,[384,388,392,397,402,407,411,416,421,426,431,435,440,445,449,453],{"type":15,"tag":78,"props":385,"children":386},{"style":85},[387],{"type":20,"value":203},{"type":15,"tag":78,"props":389,"children":390},{"style":91},[391],{"type":20,"value":208},{"type":15,"tag":78,"props":393,"children":394},{"style":85},[395],{"type":20,"value":396},"(Stream stream, ",{"type":15,"tag":78,"props":398,"children":399},{"style":251},[400],{"type":20,"value":401},"bool",{"type":15,"tag":78,"props":403,"children":404},{"style":85},[405],{"type":20,"value":406}," autoSpread ",{"type":15,"tag":78,"props":408,"children":409},{"style":251},[410],{"type":20,"value":298},{"type":15,"tag":78,"props":412,"children":413},{"style":107},[414],{"type":20,"value":415}," true",{"type":15,"tag":78,"props":417,"children":418},{"style":85},[419],{"type":20,"value":420},", ",{"type":15,"tag":78,"props":422,"children":423},{"style":251},[424],{"type":20,"value":425},"int",{"type":15,"tag":78,"props":427,"children":428},{"style":85},[429],{"type":20,"value":430}," bufferLines ",{"type":15,"tag":78,"props":432,"children":433},{"style":251},[434],{"type":20,"value":298},{"type":15,"tag":78,"props":436,"children":437},{"style":107},[438],{"type":20,"value":439}," 10",{"type":15,"tag":78,"props":441,"children":442},{"style":85},[443],{"type":20,"value":444},", Encoding encoding ",{"type":15,"tag":78,"props":446,"children":447},{"style":251},[448],{"type":20,"value":298},{"type":15,"tag":78,"props":450,"children":451},{"style":107},[452],{"type":20,"value":303},{"type":15,"tag":78,"props":454,"children":455},{"style":85},[456],{"type":20,"value":308},{"type":15,"tag":16,"props":458,"children":459},{},[460],{"type":20,"value":461},"例えば、日本語の「shift-jis」エンコーディングを使用してCSVファイルを読み込む場合：",{"type":15,"tag":68,"props":463,"children":465},{"className":70,"code":464,"language":72,"meta":7,"style":7},"sheet.LoadCSV(@\"G:\\ReoGrid\\Samples\\13TOKYO.CSV\", Encoding.GetEncoding(\"shift-jis\"));\n",[466],{"type":15,"tag":59,"props":467,"children":468},{"__ignoreMap":7},[469],{"type":15,"tag":78,"props":470,"children":471},{"class":80,"line":81},[472,476,480,484,489,494,499,503,508],{"type":15,"tag":78,"props":473,"children":474},{"style":85},[475],{"type":20,"value":203},{"type":15,"tag":78,"props":477,"children":478},{"style":91},[479],{"type":20,"value":208},{"type":15,"tag":78,"props":481,"children":482},{"style":85},[483],{"type":20,"value":98},{"type":15,"tag":78,"props":485,"children":486},{"style":101},[487],{"type":20,"value":488},"@\"G:\\ReoGrid\\Samples\\13TOKYO.CSV\"",{"type":15,"tag":78,"props":490,"children":491},{"style":85},[492],{"type":20,"value":493},", Encoding.",{"type":15,"tag":78,"props":495,"children":496},{"style":91},[497],{"type":20,"value":498},"GetEncoding",{"type":15,"tag":78,"props":500,"children":501},{"style":85},[502],{"type":20,"value":98},{"type":15,"tag":78,"props":504,"children":505},{"style":101},[506],{"type":20,"value":507},"\"shift-jis\"",{"type":15,"tag":78,"props":509,"children":510},{"style":85},[511],{"type":20,"value":512},"));\n",{"type":15,"tag":16,"props":514,"children":515},{},[516,518],{"type":20,"value":517},"読み込み後のサンプル：\n",{"type":15,"tag":519,"props":520,"children":523},"img",{"alt":521,"src":522},"142","/document/images/142-500x324.png",[],{"type":15,"tag":22,"props":525,"children":527},{"id":526},"自動拡張",[528],{"type":20,"value":526},{"type":15,"tag":16,"props":530,"children":531},{},[532,534,540,542,548],{"type":20,"value":533},"デフォルトでは、ReoGridは追加データに対応するために行と列を自動的に追加してスプレッドシートを拡張します。この動作を無効にするには、",{"type":15,"tag":59,"props":535,"children":537},{"className":536},[],[538],{"type":20,"value":539},"autoSpread",{"type":20,"value":541},"引数を",{"type":15,"tag":59,"props":543,"children":545},{"className":544},[],[546],{"type":20,"value":547},"false",{"type":20,"value":549},"に設定します。",{"type":15,"tag":551,"props":552,"children":554},"h2",{"id":553},"csv形式としてエクスポート",[555],{"type":20,"value":556},"CSV形式としてエクスポート",{"type":15,"tag":16,"props":558,"children":559},{},[560],{"type":20,"value":561},"ワークシートをCSVファイルとして保存するには、以下のメソッドを使用します。",{"type":15,"tag":68,"props":563,"children":565},{"className":70,"code":564,"language":72,"meta":7,"style":7},"var sheet = grid.CurrentWorksheet;\n\n// export to file\nsheet.ExportAsCSV(string path);\n\n// export to stream\nsheet.ExportAsCSV(Stream s);\n",[566],{"type":15,"tag":59,"props":567,"children":568},{"__ignoreMap":7},[569,592,599,607,631,638,646],{"type":15,"tag":78,"props":570,"children":571},{"class":80,"line":81},[572,577,582,587],{"type":15,"tag":78,"props":573,"children":574},{"style":251},[575],{"type":20,"value":576},"var",{"type":15,"tag":78,"props":578,"children":579},{"style":91},[580],{"type":20,"value":581}," sheet",{"type":15,"tag":78,"props":583,"children":584},{"style":251},[585],{"type":20,"value":586}," =",{"type":15,"tag":78,"props":588,"children":589},{"style":85},[590],{"type":20,"value":591}," grid.CurrentWorksheet;\n",{"type":15,"tag":78,"props":593,"children":594},{"class":80,"line":197},[595],{"type":15,"tag":78,"props":596,"children":597},{"emptyLinePlaceholder":220},[598],{"type":20,"value":223},{"type":15,"tag":78,"props":600,"children":601},{"class":80,"line":216},[602],{"type":15,"tag":78,"props":603,"children":604},{"style":191},[605],{"type":20,"value":606},"// export to file\n",{"type":15,"tag":78,"props":608,"children":609},{"class":80,"line":226},[610,614,619,623,627],{"type":15,"tag":78,"props":611,"children":612},{"style":85},[613],{"type":20,"value":203},{"type":15,"tag":78,"props":615,"children":616},{"style":91},[617],{"type":20,"value":618},"ExportAsCSV",{"type":15,"tag":78,"props":620,"children":621},{"style":85},[622],{"type":20,"value":98},{"type":15,"tag":78,"props":624,"children":625},{"style":251},[626],{"type":20,"value":254},{"type":15,"tag":78,"props":628,"children":629},{"style":85},[630],{"type":20,"value":259},{"type":15,"tag":78,"props":632,"children":633},{"class":80,"line":235},[634],{"type":15,"tag":78,"props":635,"children":636},{"emptyLinePlaceholder":220},[637],{"type":20,"value":223},{"type":15,"tag":78,"props":639,"children":640},{"class":80,"line":262},[641],{"type":15,"tag":78,"props":642,"children":643},{"style":191},[644],{"type":20,"value":645},"// export to stream\n",{"type":15,"tag":78,"props":647,"children":648},{"class":80,"line":270},[649,653,657],{"type":15,"tag":78,"props":650,"children":651},{"style":85},[652],{"type":20,"value":203},{"type":15,"tag":78,"props":654,"children":655},{"style":91},[656],{"type":20,"value":618},{"type":15,"tag":78,"props":658,"children":659},{"style":85},[660],{"type":20,"value":213},{"type":15,"tag":22,"props":662,"children":664},{"id":663},"指定範囲のエクスポート",[665],{"type":20,"value":663},{"type":15,"tag":16,"props":667,"children":668},{},[669,671,676],{"type":20,"value":670},"ReoGridでは、ワークシート全体ではなく、特定のセル範囲をエクスポートすることができます。",{"type":15,"tag":59,"props":672,"children":674},{"className":673},[],[675],{"type":20,"value":618},{"type":20,"value":677},"のオーバーロードメソッドを使用して、セル範囲または行範囲を指定できます。",{"type":15,"tag":68,"props":679,"children":681},{"className":70,"code":680,"language":72,"meta":7,"style":7},"// Export starting from the second row. This is useful for excluding the header row\n// (typically the first row) from the export.\nsheet.ExportAsCSV(@\"C:\\mypath\\file.csv\", 1);\n\n// Export a specific range of cells. For example, to export cells from A1 to H30:\nsheet.ExportAsCSV(@\"C:\\mypath\\file.csv\", \"A1:H30\");\n",[682],{"type":15,"tag":59,"props":683,"children":684},{"__ignoreMap":7},[685,693,701,734,741,749],{"type":15,"tag":78,"props":686,"children":687},{"class":80,"line":81},[688],{"type":15,"tag":78,"props":689,"children":690},{"style":191},[691],{"type":20,"value":692},"// Export starting from the second row. This is useful for excluding the header row\n",{"type":15,"tag":78,"props":694,"children":695},{"class":80,"line":197},[696],{"type":15,"tag":78,"props":697,"children":698},{"style":191},[699],{"type":20,"value":700},"// (typically the first row) from the export.\n",{"type":15,"tag":78,"props":702,"children":703},{"class":80,"line":216},[704,708,712,716,721,725,730],{"type":15,"tag":78,"props":705,"children":706},{"style":85},[707],{"type":20,"value":203},{"type":15,"tag":78,"props":709,"children":710},{"style":91},[711],{"type":20,"value":618},{"type":15,"tag":78,"props":713,"children":714},{"style":85},[715],{"type":20,"value":98},{"type":15,"tag":78,"props":717,"children":718},{"style":101},[719],{"type":20,"value":720},"@\"C:\\mypath\\file.csv\"",{"type":15,"tag":78,"props":722,"children":723},{"style":85},[724],{"type":20,"value":420},{"type":15,"tag":78,"props":726,"children":727},{"style":107},[728],{"type":20,"value":729},"1",{"type":15,"tag":78,"props":731,"children":732},{"style":85},[733],{"type":20,"value":308},{"type":15,"tag":78,"props":735,"children":736},{"class":80,"line":226},[737],{"type":15,"tag":78,"props":738,"children":739},{"emptyLinePlaceholder":220},[740],{"type":20,"value":223},{"type":15,"tag":78,"props":742,"children":743},{"class":80,"line":235},[744],{"type":15,"tag":78,"props":745,"children":746},{"style":191},[747],{"type":20,"value":748},"// Export a specific range of cells. For example, to export cells from A1 to H30:\n",{"type":15,"tag":78,"props":750,"children":751},{"class":80,"line":262},[752,756,760,764,768,772,777],{"type":15,"tag":78,"props":753,"children":754},{"style":85},[755],{"type":20,"value":203},{"type":15,"tag":78,"props":757,"children":758},{"style":91},[759],{"type":20,"value":618},{"type":15,"tag":78,"props":761,"children":762},{"style":85},[763],{"type":20,"value":98},{"type":15,"tag":78,"props":765,"children":766},{"style":101},[767],{"type":20,"value":720},{"type":15,"tag":78,"props":769,"children":770},{"style":85},[771],{"type":20,"value":420},{"type":15,"tag":78,"props":773,"children":774},{"style":101},[775],{"type":20,"value":776},"\"A1:H30\"",{"type":15,"tag":78,"props":778,"children":779},{"style":85},[780],{"type":20,"value":308},{"type":15,"tag":16,"props":782,"children":783},{},[784],{"type":20,"value":785},"最初の例は、2行目からエクスポートを開始する方法で、ヘッダー行を除外したい場合に便利です。2番目の例は、「A1:H30」で定義された特定のセル範囲をエクスポートします。",{"type":15,"tag":22,"props":787,"children":789},{"id":788},"エンコーディングを指定したエクスポート",[790],{"type":20,"value":788},{"type":15,"tag":16,"props":792,"children":793},{},[794,796,801],{"type":20,"value":795},"ワークシートにUnicodeテキストが含まれている場合、エクスポートされたCSVファイルがテキストを正しく表現するようにエンコーディングを指定する必要がある場合があります。",{"type":15,"tag":59,"props":797,"children":799},{"className":798},[],[800],{"type":20,"value":618},{"type":20,"value":802},"メソッドの3番目の引数でエンコーディングを指定します。",{"type":15,"tag":68,"props":804,"children":806},{"className":70,"code":805,"language":72,"meta":7,"style":7},"// Export the range A1:H30 to a CSV file using the \"shift-jis\" encoding.\n// This is useful for preserving special characters or language-specific text.\nsheet.ExportAsCSV(@\"C:\\mypath\\file.csv\", \"A1:H30\", Encoding.GetEncoding(\"shift-jis\"));\n",[807],{"type":15,"tag":59,"props":808,"children":809},{"__ignoreMap":7},[810,818,826],{"type":15,"tag":78,"props":811,"children":812},{"class":80,"line":81},[813],{"type":15,"tag":78,"props":814,"children":815},{"style":191},[816],{"type":20,"value":817},"// Export the range A1:H30 to a CSV file using the \"shift-jis\" encoding.\n",{"type":15,"tag":78,"props":819,"children":820},{"class":80,"line":197},[821],{"type":15,"tag":78,"props":822,"children":823},{"style":191},[824],{"type":20,"value":825},"// This is useful for preserving special characters or language-specific text.\n",{"type":15,"tag":78,"props":827,"children":828},{"class":80,"line":216},[829,833,837,841,845,849,853,857,861,865,869],{"type":15,"tag":78,"props":830,"children":831},{"style":85},[832],{"type":20,"value":203},{"type":15,"tag":78,"props":834,"children":835},{"style":91},[836],{"type":20,"value":618},{"type":15,"tag":78,"props":838,"children":839},{"style":85},[840],{"type":20,"value":98},{"type":15,"tag":78,"props":842,"children":843},{"style":101},[844],{"type":20,"value":720},{"type":15,"tag":78,"props":846,"children":847},{"style":85},[848],{"type":20,"value":420},{"type":15,"tag":78,"props":850,"children":851},{"style":101},[852],{"type":20,"value":776},{"type":15,"tag":78,"props":854,"children":855},{"style":85},[856],{"type":20,"value":493},{"type":15,"tag":78,"props":858,"children":859},{"style":91},[860],{"type":20,"value":498},{"type":15,"tag":78,"props":862,"children":863},{"style":85},[864],{"type":20,"value":98},{"type":15,"tag":78,"props":866,"children":867},{"style":101},[868],{"type":20,"value":507},{"type":15,"tag":78,"props":870,"children":871},{"style":85},[872],{"type":20,"value":512},{"type":15,"tag":16,"props":874,"children":875},{},[876],{"type":20,"value":877},"これにより、指定された範囲「A1:H30」が「shift-jis」エンコーディングでCSVファイルにエクスポートされます。特殊文字や特定のエンコーディングが必要な言語のテキストの整合性を保つのに特に便利です。",{"type":15,"tag":879,"props":880,"children":881},"style",{},[882],{"type":20,"value":883},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":197,"depth":197,"links":885},[886,887,888,889],{"id":24,"depth":216,"text":27},{"id":147,"depth":216,"text":150},{"id":526,"depth":216,"text":526},{"id":553,"depth":197,"text":556,"children":890},[891,892],{"id":663,"depth":216,"text":663},{"id":788,"depth":216,"text":788},"markdown","content:document:14.io:3.csv-format.md","content","document/14.io/3.csv-format.md","document/14.io/3.csv-format","md",{"loc":4},[901,1224,1227,1230,1233,1236,1239,1242,1245],{"title":902,"_path":903,"children":904},"Document","/document",[905,916,921,953,970,999,1031,1051,1065,1088,1099,1115,1138,1149,1167,1187,1216],{"title":906,"_path":907,"children":908},"はじめに","/document/getting-started",[909,910,913],{"title":906,"_path":907},{"title":911,"_path":912},"インストール","/document/getting-started/installation",{"title":914,"_path":915},"V3 から V4 への移行ガイド","/document/getting-started/migrate-from-v3",{"title":917,"_path":918,"children":919},"ワークブック","/document/workbook",[920],{"title":917,"_path":918},{"title":922,"_path":923,"children":924},"ワークシート","/document/worksheet",[925,926,929,932,935,938,941,944,947,950],{"title":922,"_path":923},{"title":927,"_path":928},"行、列、ヘッダー","/document/worksheet/row-and-column",{"title":930,"_path":931},"範囲","/document/worksheet/range",{"title":933,"_path":934},"名前付き範囲","/document/worksheet/named-range",{"title":936,"_path":937},"セルの結合と解除","/document/worksheet/merge-and-unmerge",{"title":939,"_path":940},"パーシャルグリッド","/document/worksheet/partial-grid",{"title":942,"_path":943},"複数行ヘッダー","/document/worksheet/multiple-row-header",{"title":945,"_path":946},"ウィンドウ枠の固定","/document/worksheet/freeze",{"title":948,"_path":949},"ズーム","/document/worksheet/zoom",{"title":951,"_path":952},"設定とオプション","/document/worksheet/settings",{"title":954,"_path":955,"children":956},"選択とナビゲーション","/document/selection",[957,958,961,964,967],{"title":954,"_path":955},{"title":959,"_path":960},"フォーカスと選択","/document/selection/selection",{"title":962,"_path":963},"範囲の選択","/document/selection/pick-range",{"title":965,"_path":966},"クリップボード","/document/selection/clipboard",{"title":968,"_path":969},"テキスト検索","/document/selection/text-search",{"title":971,"_path":972,"children":973},"データ管理","/document/data",[974,975,978,981,984,987,990,993,996],{"title":971,"_path":972},{"title":976,"_path":977},"データソース","/document/data/datasource",{"title":979,"_path":980},"データフィルタリング","/document/data/data-filtering",{"title":982,"_path":983},"組み込みオートフィルター","/document/data/builtin-autofilter",{"title":985,"_path":986},"条件付きフィルター","/document/data/conditional-filter",{"title":988,"_path":989},"条件付きスタイル","/document/data/conditional-styles",{"title":991,"_path":992},"グループとアウトライン","/document/data/group-and-outline",{"title":994,"_path":995},"データバリデーション","/document/data/data-validation",{"title":997,"_path":998},"保護とロック","/document/data/protection",{"title":1000,"_path":1001,"children":1002},"セル","/document/cell",[1003,1004,1007,1010,1013,1016,1019,1022,1025,1028],{"title":1000,"_path":1001},{"title":1005,"_path":1006},"セルの編集","/document/cell/cell-edit",{"title":1008,"_path":1009},"スタイル","/document/cell/style",{"title":1011,"_path":1012},"罫線","/document/cell/border",{"title":1014,"_path":1015},"データ書式","/document/cell/data-format",{"title":1017,"_path":1018},"カスタムデータフォーマッター","/document/cell/custom-data-formatter",{"title":1020,"_path":1021},"データ連続入力","/document/cell/auto-fill",{"title":1023,"_path":1024},"リッチフォーマットテキスト","/document/cell/rich-format-text",{"title":1026,"_path":1027},"セルテキストの回転","/document/cell/rotate-cell-text",{"title":1029,"_path":1030},"セルの反復処理","/document/cell/iterate-cells",{"title":1032,"_path":1033,"children":1034},"セルタイプ","/document/cell-types",[1035,1036,1039,1042,1045,1048],{"title":1032,"_path":1033},{"title":1037,"_path":1038},"組み込みセルタイプ","/document/cell-types/built-in-cell-types",{"title":1040,"_path":1041},"カスタムセル","/document/cell-types/custom-cell",{"title":1043,"_path":1044},"ドロップダウンリストセル","/document/cell-types/dropdown-list-cell",{"title":1046,"_path":1047},"コンボリストセル","/document/cell-types/combo-list-cell",{"title":1049,"_path":1050},"列全体のセルタイプ","/document/cell-types/cells-type-for-entire-column",{"title":1052,"_path":1053,"children":1054},"数式","/document/formula",[1055,1056,1059,1062],{"title":1052,"_path":1053},{"title":1057,"_path":1058},"カスタム関数","/document/formula/custom-function",{"title":1060,"_path":1061},"数式関数","/document/formula/formula-functions",{"title":1063,"_path":1064},"VLOOKUP","/document/formula/vlookup",{"title":1066,"_path":1067,"children":1068},"チャート","/document/chart",[1069,1070,1073,1076,1079,1082,1085],{"title":1066,"_path":1067},{"title":1071,"_path":1072},"縦棒グラフ","/document/chart/column-chart",{"title":1074,"_path":1075},"横棒グラフ","/document/chart/bar-chart",{"title":1077,"_path":1078},"折れ線グラフ","/document/chart/line-chart",{"title":1080,"_path":1081},"面グラフ","/document/chart/area-chart",{"title":1083,"_path":1084},"2D円グラフ","/document/chart/pie-2d-chart",{"title":1086,"_path":1087},"ドーナツグラフ","/document/chart/doughnut-chart",{"title":1089,"_path":1090,"children":1091},"フローティングオブジェクト","/document/floating",[1092,1093,1096],{"title":1089,"_path":1090},{"title":1094,"_path":1095},"描画シェイプ","/document/floating/drawing-shapes",{"title":1097,"_path":1098},"フローティング画像","/document/floating/floating-image",{"title":1100,"_path":1101,"children":1102},"イベント","/document/events",[1103,1104,1106,1109,1112],{"title":1100,"_path":1101},{"title":1100,"_path":1105},"/document/events/events",{"title":1107,"_path":1108},"キーボードイベント","/document/events/keyboard-events",{"title":1110,"_path":1111},"マウスイベント","/document/events/mouse-events",{"title":1113,"_path":1114},"SelectionRangeChanged","/document/events/selection-events",{"title":1116,"_path":1117,"children":1118},"カスタマイズ","/document/customization",[1119,1120,1123,1126,1129,1132,1135],{"title":1116,"_path":1117},{"title":1121,"_path":1122},"コントロールの外観","/document/customization/control-appearance",{"title":1124,"_path":1125},"シートタブコントロール","/document/customization/sheet-tab-control",{"title":1127,"_path":1128},"使用可能なホットキー","/document/customization/hot-keys",{"title":1130,"_path":1131},"言語ローカライズ","/document/customization/language-localization",{"title":1133,"_path":1134},"アドレスバーと数式バー","/document/customization/formula-bar",{"title":1136,"_path":1137},"ReoGridEditor","/document/customization/editor",{"title":1139,"_path":1140,"children":1141},"アクション","/document/actions",[1142,1143,1146],{"title":1139,"_path":1140},{"title":1144,"_path":1145},"ReoGridアクションフレームワーク","/document/actions/actions",{"title":1147,"_path":1148},"組み込みワークシートアクション","/document/actions/built-in-actions",{"title":1150,"_path":1151,"children":1152},"ファイル形式","/document/io",[1153,1154,1157,1158,1161,1164],{"title":1150,"_path":1151},{"title":1155,"_path":1156},"Excelファイル形式 (xlsx)","/document/io/excel-file-format",{"title":8,"_path":4},{"title":1159,"_path":1160},"RGF形式","/document/io/rgf-format",{"title":1162,"_path":1163},"Excel形式とRGF形式の違い","/document/io/difference-between-excel-and-rgf-format",{"title":1165,"_path":1166},"HTMLとしてエクスポート","/document/io/export-as-html",{"title":1168,"_path":1169,"children":1170},"高度な機能","/document/advanced",[1171,1172,1175,1178,1181,1184],{"title":1168,"_path":1169},{"title":1173,"_path":1174},"メモリワークブック","/document/advanced/memory-workbook",{"title":1176,"_path":1177},"ページングと印刷","/document/advanced/paging-and-print",{"title":1179,"_path":1180},"コントロールのリセット","/document/advanced/reset-control",{"title":1182,"_path":1183},"パフォーマンス","/document/advanced/performance",{"title":1185,"_path":1186},"設定","/document/advanced/settings",{"title":1188,"_path":1189,"children":1190},"ハウツーガイド","/document/how-to",[1191,1192,1195,1198,1201,1204,1207,1210,1213],{"title":1188,"_path":1189},{"title":1193,"_path":1194},"ReoGridの推奨プラクティス","/document/how-to/recommended-practice-for-using-reogrid",{"title":1196,"_path":1197},"DataTableでスプレッドシートを埋める","/document/how-to/fill-grid-with-datatable",{"title":1199,"_path":1200},"遅延読み込みモードによる大量データの高速読み込み","/document/how-to/fast-load-large-data-with-lazy-load-mode",{"title":1202,"_path":1203},"カスタムドロップダウンセルの作成","/document/how-to/create-custom-drop-down-cell",{"title":1205,"_path":1206},"日付ピッカーセルの作成","/document/how-to/create-date-picker-cell",{"title":1208,"_path":1209},"Excelファイルからすべての画像を読み取る","/document/how-to/read-all-images-from-excel-file",{"title":1211,"_path":1212},"VB.NETでReoGridを使用するためのヒント","/document/how-to/use-reogrid-in-vb-net",{"title":1214,"_path":1215},"全選択チェックボックスヘッダーの作成","/document/how-to/create-select-all-checkbox-header",{"title":1217,"_path":1218,"children":1219},"トラブルシューティング","/document/troubleshooting",[1220,1221],{"title":1217,"_path":1218},{"title":1222,"_path":1223},"PInvoke例外の修正","/document/troubleshooting/fix-pinvoke-exception",{"title":1225,"_path":1226},"エディション・機能一覧","/editions-features",{"title":1228,"_path":1229},"個人情報保護方針","/privacy-policy",{"title":1231,"_path":1232},"動作環境","/requirements",{"title":1234,"_path":1235},"ReoGrid利用許諾契約書","/terms",{"title":1237,"_path":1238},"ReoGrid利用許諾契約書(Ver.3)","/terms-v3",{"title":1240,"_path":1241},"ReoGrid利用許諾契約書(Ver.4)","/terms-v4",{"title":1243,"_path":1244},"ReoGrid 4 トライアルライセンスポリシー","/terms-v4-trial",{"title":1246,"_path":1247},"ReoGrid Web Edition 利用許諾契約書","/terms-web",1786025046955]