File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,13 +25,14 @@ limitations under the License.
2525<section name =" Using Commons CSV" >
2626 <p >Commons CSV reads and writes files in variations of the Comma Separated Value (CSV) format.</p >
2727 <p >To parse an Excel CSV file, write:</p >
28- <source >Reader in = ... ;
28+ <source >Reader in = new FileReader( " path/to/file.csv " ) ;
2929Iterable< CSVRecord> parser = CSVFormat.EXCEL.parse(in);
3030for (CSVRecord record : parser) {
31- ...
31+ String lastName = record.get("Last Name");
32+ String firstName = record.get("First Name");
3233}</source >
3334 <p >Other formats are available, please consult the Javadoc for <a href =" apidocs/org/apache/commons/csv/CSVFormat.html" >CSVFormat</a > and
34- <a href =" apidocs/org/apache/commons/csv/CSVParser.html" >CSVParser</a ></p >
35+ <a href =" apidocs/org/apache/commons/csv/CSVParser.html" >CSVParser</a >. </p >
3536</section >
3637
3738<section name =" Getting the code" >
You can’t perform that action at this time.
0 commit comments