Skip to content

Instantly share code, notes, and snippets.

@mamesiva64
Last active March 12, 2018 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mamesiva64/1a0e294f09aedd340a4ff8aaf7e0d202 to your computer and use it in GitHub Desktop.
Save mamesiva64/1a0e294f09aedd340a4ff8aaf7e0d202 to your computer and use it in GitHub Desktop.
CsvFileSample
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CsvTest
{
class Program
{
static void Main(string[] args)
{
var csv = new AlpacaTech.CsvFile("data.csv", ",", Encoding.GetEncoding("shift-jis"));
// ランダムアクセス([y][x])
System.Console.WriteLine(csv.lines[5][3] );
System.Console.WriteLine("------------------------");
// 全てにアクセス
foreach (var line in csv.lines)
{
foreach (var v in line)
{
System.Console.WriteLine(v);
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment