File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ limitations under the License.
2727 <source >Reader in = new FileReader(" path/to/file.csv" );
2828Iterable< CSVRecord> records = CSVFormat.EXCEL.parse(in);
2929for (CSVRecord record : records) {
30- String lastName = record.get("Last Name");
31- String firstName = record.get("First Name");
30+ String lastName = record.get("Last Name");
31+ String firstName = record.get("First Name");
3232}</source >
3333</section >
3434<section name =" Handling Byte Order Marks" >
@@ -42,13 +42,13 @@ for (CSVRecord record : records) {
4242final Reader reader = new InputStreamReader(new BOMInputStream(url.openStream()), "UTF-8");
4343final CSVParser parser = new CSVParser(reader, CSVFormat.EXCEL.withHeader());
4444try {
45- for (final CSVRecord record : parser) {
46- final String string = record.get("SomeColumn");
47- ...
48- }
45+ for (final CSVRecord record : parser) {
46+ final String string = record.get("SomeColumn");
47+ ...
48+ }
4949} finally {
50- parser.close();
51- reader.close();
50+ parser.close();
51+ reader.close();
5252}</source >
5353</section >
5454<!-- ================================================== -->
You can’t perform that action at this time.
0 commit comments