title: How to read csv file of excel using apache csv
body: <p>I have a CSV file(excel) in which each data is available in cell like excel. I'm using Apache CSV to parse excel type csv. While parsing the data my each character is getting separated by null character in between. This CSV file I'm getting from different source but when I'm copying the same excel csv file data and making a excel csv file manually, my below code able to get the desired output.</p>
  
  <p><strong>My CSV Excel:</strong><br/>
  <a href="https://i.stack.imgur.com/lDZHu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lDZHu.png" alt="MyCSVExcel.jpg"></a></p>
  
  <p><strong>My Code:</strong></p>
  
  <pre><code>InputStream is =null;
  Reader in =null;
  is = new ByteArrayInputStream(excelCSVFile);
  
  in = new InputStreamReader(is);
  
  CSVParser parser = new CSVParser(in, CSVFormat.EXCEL.withHeader("EMPLOYEE_ID","NAME","DOJ",
                      "MOBILE_NO").withSkipHeaderRecord(true).withTrim(true));
  
  List&lt;CSVRecord&gt; records = parser.getRecords();
  
  for (CSVRecord record : records) {
  
  System.out.println("Employee Id::"+record.get("EMPLOYEE_ID"));
  
  System.out.println("Employee Name::"+record.get("NAME"));
  
  }
  </code></pre>
  
  <p><strong>I'm getting output here by above code is:</strong><br/>
  <a href="https://i.stack.imgur.com/3JYeE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3JYeE.png" alt="MyOutput"></a></p>
  
  <p>When I checked the ASCII value for blank character I got <strong>'0'</strong> as value means Null character. </p>
  
  <p><strong>I was looking to get output like this:</strong><br/>
  <a href="https://i.stack.imgur.com/5Alfi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5Alfi.png" alt="ActuallOutput"></a></p>