Giter Site home page Giter Site logo

unterrainerinformatik / simplecsv Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 52 KB

A small but powerful library for writing and reading CSV files. Supports buffered stream-input, so you don't have to have all of it in RAM.

License: The Unlicense

C# 99.81% Batchfile 0.19%
csv comma separated values reader writer stream buffer

simplecsv's Introduction

NuGet NuGet license Twitter Follow

General

This section contains various useful projects that should help your development-process.

This section of our GIT repositories is free. You may copy, use or rewrite every single one of its contained projects to your hearts content.
In order to get help with basic GIT commands you may try the GIT cheat-sheet on our homepage.

This repository located on our homepage is private since this is the master- and release-branch. You may clone it, but it will be read-only.
If you want to contribute to our repository (push, open pull requests), please use the copy on github located here: the public github repository

Icon SimpleCSV

A small but powerful library for writing and reading CSV files. Supports buffered stream-input, so you don't have to have all of it in RAM.

This project helps you to read and write CSV (Comma Separated Values) files in your program. Those files are legacy, but many developers still use them because of their readability and because every sheet-calculation program can perfectly edit them. With the classes in this project you can read/write them via a stream, so that not every byte of the CSV has to be in memory beforehand and they provide nice and fluid interfaces for all functions, they are well tested (visit the project-page) and they are capable of reading and writing quoted values. Give it a try.

If you like this repo, please don't forget to star it. Thank you.

Getting Started

StringReader

StringReader stringReader = new StringReader("\"test\";test1;A 01;t;;");

CsvReader csvReader = new CsvReader(stringReader, ';', "\n", '\"');
List<string> row = csvReader.ReadRow();

StringWriter

using(CsvWriter csvWriter = new CsvWriter(new StringBuilder(), ';', "\n", '\"'))
{
  csvWriter.Write("Great");
  csvWriter.Write("Totally");
  csvWriter.Write("This is a\nbreak");
  // The next two lines do the same as calling csvWriter.writeLine("");
  csvWriter.Write();
  csvWriter.WriteLine();

  csvWriter.Write().Write("Gr;eat").WriteLine("Totally");

  csvWriter.Write("Great").Write("ssfe\"s").Write("").Write("Totally");
}

For more and more elaborate examples, take a look at the test-project.

simplecsv's People

Contributors

gufalcon avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.