Reading and modifying existing CSV files
var csv = new Csv (); csv.LoadUtf8File( "c:\\data.csv" ); KotakPesan.Tampilkan (csv.ToString());
Create a new CSV file:
var csv = new Csv (); csv.JumlahBaris = 10; untuk ( int i = 0; i < csv.JumlahBaris; ++i) { csv.SetFieldCount(i, 3); untuk ( int j = 0; j < csv.JumlahBaris(i); ++j) csv[i, j] = "Bidang " + i + " " + j; } csv.ToUtf8File( "c:\\baru.csv" )
Use the fast CsvWriter to create CSV files without the overhead of the Csv class memory:
menggunakan ( var penulis = new CsvWriter ( "c:\\export.csv" )) { penulis.Tulis( "Kolom 1 1" ); penulis.Tulis( "Kolom 1 2" ); penulis.Tulis( "Kolom 1 3" ); penulis.NextLine(); penulis.Tulis( "Kolom 2 1" ); penulis.Tulis( "Kolom 2 2" ); penulis.Tulis( "Kolom 2 3" ); penulis.NextLine(); penulis.Tulis( "Kolom 3 1" ); penulis.Tulis( "Kolom 3 2" ); penulis.Tulis( "Kolom 3 3" ); }
Features Included:
- Read and modify existing CSV files
- Create new CSV files
- Optimized for large data sets
- Selectable field separators
- Selectable CR/LF/CRLF output
- Selectable delimiter characters
- Optional addition of delimiter white space
- Optimized output, delimiter characters applied “as needed”
- Supports UTF-8 and ANSI files
- Supports rows with varying numbers of fields
- Supports insertion and deletion of rows and fields
- Available for .NET 2 through 4.7
- Source code included in registered version
- Royalty-free distribution in applications

