title: Writing to Excel File using hash map
body: <ul>
  <li>Hi,I'm getting exact values from hash map but my Apache POI Row and
  Cell cannot set values properly expected result like that please let me
  know.Thanks</li>
  </ul>
  
  <p>I'm getting result hash-map like that:</p>
  
  <pre><code>{1=[ACSS Description1, ACSS Description2, ACSS Description3, SACSS Description4], 2=[11, 1, 4, 12]}
  </code></pre>
  
  <p>I'm expecting:</p>
  
  <p><img src="https://i.stack.imgur.com/jzrYm.png" alt="![enter image description here](http://i.stack.imgur.com/nTnMX.png)"></p>
  
  <p>I'm getting result based on below code :</p>
  
  <p><img src="https://i.stack.imgur.com/rqlok.png" alt="enter image description here"></p>
  
  <p>And that's my code:</p>
  
  <pre><code>   public void getList(List&lt;ExportReport&gt; listcriteria)
      {
          Map&lt;Integer, List&lt;String&gt;&gt; hashmap = new HashMap&lt;Integer , List&lt;String&gt;&gt;();
          List&lt;String&gt; listpropertyvalue =new ArrayList&lt;String&gt;();
          for(int i=0; i &lt; listcriteria.size(); i++)
          {
              String strValue =listcriteria.get(i).getDescription();
              listpropertyvalue.add(strValue);
              hashmap.put(1, listpropertyname); 
          }
             listpropertyvalue =new ArrayList&lt;String&gt;();
              for(int i=0;i&lt;listcriteria.size();i++){
  
                  String strInterValue=listcriteria.get(i).getExportIntervalId().toString();
                  listpropertyvalue.add(strInterValue);
                  hashmap.put(2, listpropertvalue); 
              }
      }
      Set&lt;Integer&gt; keyset = hashmap.keySet();
      int rownum = 1;
    int cellnum = 0
  
      for(Integer key : keyset){
  
          Row row = worksheet.createRow(rownum++);
  
          Cell cell = row.createCell(cellnum);
          List&lt;String&gt; nameList = hashmap.get(key);
          for(Object obj : nameList)
          {
              if(obj instanceof Date)
              {
                  cell.setCellValue((Date) obj);
              }
              else if(obj instanceof Boolean)
              {
                  cell.setCellValue((Boolean) obj);
              }
              else if(obj instanceof String)
              {
                  cell.setCellValue((String) obj);
              }
              else if(obj instanceof Double)
              {
                   cell.setCellValue((Double) obj);
              }
          }
             cellnum++;
              rownum=1;
      }
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>