title: How to add multiple different columns of excel using Apache POI & Java
body: <p>I need to generate <code>CodeKey</code> that is combination of <code>two columns</code> of excel value and values in those columns can be <code>Boolean</code>, <code>String</code>, <code>Numeric</code> or combination of all of those. </p>
  
  <p>Now I can go through <code>if/else loop</code> and check for every condition but what would be an efficient way of doing this. </p>
  
  <p><strong>For Example:</strong></p>
  
  <p>If i have <code>ExCode = 7V</code> and <code>PrCode = A:</code> then my CodeKey should be <code>7VA:</code></p>
  
  <pre><code> ExCode  PrCode
   6D:     A:
   6R      TR
   7V      6K
  </code></pre>
  
  <p>And all i want to do is generate CodeKey as <code>6D:A:</code>, <code>6RTR</code> and <code>7V6K</code> respectively. </p>
  
  <p>Don't want to do something like:</p>
  
  <pre><code> if(ExCodeCellValue.getCellType() == Cell.CELL_TYPE_STRING &amp;&amp;
             PrCodeCellValue.getCellType() == Cell.CELL_TYPE_STRING){
              System.out.println("Combined String Values: "+ExCodeCellValue.getStringValue()+PrCodeCellValue.getStringValue());
          }
  </code></pre>
  
  <p>As there would be lots of <code>if/else</code> unnecessary stuffs to generate codeKey, any other efficient solution of doing this or is there any <code>api</code> in <code>POI</code> that would be useful for this case?</p>