title: How to read Excel ListBox value in Java using Apache POI
body: <p>How to read Excel ListBox value in Java using Apache POI ?
  On web this is the only thread that discussed abou this problem.
  <a href="http://apache-poi.1045710.n5.nabble.com/sample-code-to-read-excel-listbox-values-td2308018.html" rel="nofollow">http://apache-poi.1045710.n5.nabble.com/sample-code-to-read-excel-listbox-values-td2308018.html</a></p>
  
  <p>But this code does not work. 
  It uses this code</p>
  
  <pre><code>    HSSFWorkbook workbook = null;
      HSSFSheet sheet = null;
      HSSFRow row = null;
      HSSFCell cell = null;
      HSSFDataValidation dataValidation = null;
  
      try { 
          inputStream = new java.io.FileInputStream(new java.io.File("C:/temp/data validation.xls"));
          workbook = new HSSFWorkbook(inputStream);
          sheet = workbook.getSheetAt(0);
          validationRecords = sheet.getDVRecords(); 
  </code></pre>
  
  <p>But in HSSF version which I am using "getDVRecords" method is not available in HSSFSheet.</p>
  
  <p>Is there any better and working code ?</p>
  
  <p>EDIT: 
  I already have code to read values of normal cell or dropdown. I am specifically looking for code to read listbox. List box is where you can select more than one values. ListBox are not tied to any specific cell. They appear as components overlaid on the sheet</p>
  
  <p>Please refer this link to see how to add listbox. This will help better understand my question. 
  <a href="http://office.microsoft.com/en-in/excel-help/add-a-list-box-or-combo-box-to-a-worksheet-HP010236681.aspx" rel="nofollow">http://office.microsoft.com/en-in/excel-help/add-a-list-box-or-combo-box-to-a-worksheet-HP010236681.aspx</a></p>