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:
parent
67155b3d52
commit
46ce06d3ff
|
@ -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>To parse an Excel CSV file, write:</p>
|
||||
<source>Reader in = new FileReader("path/to/file.csv");
|
||||
Iterable<CSVRecord> parser = CSVFormat.EXCEL.parse(in);
|
||||
for (CSVRecord record : parser) {
|
||||
Iterable<CSVRecord> records = CSVFormat.EXCEL.parse(in);
|
||||
for (CSVRecord record : records) {
|
||||
String lastName = record.get("Last Name");
|
||||
String firstName = record.get("First Name");
|
||||
}</source>
|
||||
|
|
Loading…
Reference in New Issue