Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dakside/dcsv
Dakside CSV is a light weight library for CSV data manipulation.
https://github.com/dakside/dcsv
csv gpl java library lightweight
Last synced: 3 months ago
JSON representation
Dakside CSV is a light weight library for CSV data manipulation.
- Host: GitHub
- URL: https://github.com/dakside/dcsv
- Owner: dakside
- License: gpl-3.0
- Created: 2015-04-29T13:50:50.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-09-07T07:53:38.000Z (over 6 years ago)
- Last Synced: 2023-02-28T16:52:59.867Z (almost 2 years ago)
- Topics: csv, gpl, java, library, lightweight
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dcsv
Dakside CSV is a light weight library for CSV data manipulation.## Introduction
Dakside.CSV is a lightweight yet powerful library for process CSV file. Main features of dCSV are:
1. Thread-safe of write & read CSV file from/to streams, readers, and files.
2. Fast learning curve (CSV library is very easy to use).
3. Small size (7KB in total)## Examples
Reading CSV data is very easy:
``` java
import dakside.csv.*;public class Example2 {
public static void main(String[] args) {
CSVFile csv = CSVFileReader.parseFile("/home/someone/sample.csv");
}
}
```Writing content to CSV file:
``` java
import dakside.csv.CSVFile;
import dakside.csv.CSVFileWriter;
import java.util.Date;public class ExampleSimple {
public static void main(String[] args) {
CSVFile csvData = new CSVFile();
//add some data
csvData.newLine().add("Name").add("Salary").add("Birthday"); //line 1
csvData.newLine().add("Boo").add(4300).add(new Date(86, 4, 23)); //line 2
csvData.newLine().add("Joe").add(6800.5).add(new Date(84, 9, 27)); //line 3//Create a writer to write CSV data
CSVFileWriter writer = new CSVFileWriter("/home/someone/employees.csv");//Write csvData to file
writer.writeFile(csvData);//Close file (auto save)
writer.close();
}
}
```and here is the results.
```File: employees.csv
Name,Salary,Birthday
Boo,4300,Fri May 23 00:00:00 SGT 1986
Joe,6800.5,Sat Oct 27 00:00:00 SGT 1984
```