forked from apache/commons-csv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.xml
More file actions
64 lines (58 loc) · 3.55 KB
/
Copy pathindex.xml
File metadata and controls
64 lines (58 loc) · 3.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document>
<properties>
<title>Home</title>
<author email="dev@commons.apache.org">Commons Documentation Team</author>
</properties>
<body>
<!-- ================================================== -->
<section name="Using Commons CSV">
<p>Commons CSV reads and writes files in variations of the Comma Separated Value (CSV) format.</p>
<p>To parse an Excel CSV file, write:</p>
<source>Reader in = new FileReader("path/to/file.csv");
Iterable<CSVRecord> records = CSVFormat.EXCEL.parse(in);
for (CSVRecord record : records) {
String lastName = record.get("Last Name");
String firstName = record.get("First Name");
}</source>
<p>Other formats are available, please consult the Javadoc for <a href="apidocs/org/apache/commons/csv/CSVFormat.html">CSVFormat</a> and
<a href="apidocs/org/apache/commons/csv/CSVParser.html">CSVParser</a>.</p>
</section>
<section name="Getting the code">
<p>There are currently no official downloads, and will not be until version 1.0 is released, but nightly builds may be available from <a href="http://people.apache.org/builds/commons/nightly/commons-csv/">http://people.apache.org/builds/commons/nightly/commons-csv/</a>. </p>
<p>The latest code can be checked out from our Subversion repository at <a href="http://svn.apache.org/repos/asf/commons/proper/csv/trunk/">http://svn.apache.org/repos/asf/commons/proper/csv/trunk/</a>. </p>
<p>You can build the component using Apache Maven 3. For example: mvn clean package. Maven 2 will not work.</p>
</section>
<section name="Reporting bugs">
<p>Please report any bugs or issues in the Commons Sandbox Jira project at <a href="http://issues.apache.org/jira/browse/CSV">http://issues.apache.org/jira/browse/CSV</a>. Please ask any questions or suggest any ideas for improvement on the commons-dev and commons-user <a href="mail-lists.html">mailing lists</a>. </p>
</section>
<section name="About Commons CSV">
<p>Commons CSV was started to unify a common and simple interface for reading and writing CSV files under an ASL license. It has been bootstrapped by a code donation from Netcetera in Switzerland. There are three pre-existing BSD compatible CSV parsers which this component will hopefully make redundant (authors willing): </p>
<ul>
<li><a href="http://kasparov.skife.org/csv/">Skife CSV</a></li>
<li><a href="http://opencsv.sourceforge.net/">Open CSV</a></li>
<li><a href="http://www.osjava.org/genjava/multiproject/gj-csv/">Genjava CSV</a></li>
</ul>
<p>In addition to the code from Netcetera (org.apache.commons.csv), Martin van den Bemt has added an additional writer API. </p>
<p>Other CSV implementations: </p>
<ul>
<li><a href="http://supercsv.sourceforge.net/">Super CSV</a></li>
</ul>
</section>
<!-- ================================================== -->
</body>
</document>