We are really iterating over records here

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522811 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benedikt Ritter 2013-09-13 08:29:49 +00:00
parent 67155b3d52
commit 46ce06d3ff
1 changed files with 2 additions and 2 deletions

View File

@ -26,8 +26,8 @@ limitations under the License.
<p>Commons CSV reads and writes files in variations of the Comma Separated Value (CSV) format.</p> <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> <p>To parse an Excel CSV file, write:</p>
<source>Reader in = new FileReader(&quot;path/to/file.csv&quot;); <source>Reader in = new FileReader(&quot;path/to/file.csv&quot;);
Iterable&lt;CSVRecord&gt; parser = CSVFormat.EXCEL.parse(in); Iterable&lt;CSVRecord&gt; records = CSVFormat.EXCEL.parse(in);
for (CSVRecord record : parser) { for (CSVRecord record : records) {
String lastName = record.get("Last Name"); String lastName = record.get("Last Name");
String firstName = record.get("First Name"); String firstName = record.get("First Name");
}</source> }</source>