title: How to Divide the data in excel sheet which have different white spaces
body: <p>I am getting data from an Excel sheet using Java. I have to divide every line of the Excel sheet and store them into Arrays <code>Item1</code>, <code>Item2</code>, <code>Item3</code>, <code>Item4</code> respectively.. </p>
  
  <h2>Excel sheet</h2>
  
  <pre>
  1.  Item1         Item2       Item3        Item4
  2.  104F410       020544E0    1120D3614    HD434816N 43X48 16-MIC CLEAR Runas
  3.  Promo 1343u   548548T     3465689634   HD404816N 40X48 16-MIC CLEAR
  </pre>
  
  <p>(etc)</p>
  
  <p>I used the following code, but it is getting Items incorrectly like <code>Item2</code> and <code>Item3</code> as Item</p>
  
  <pre><code>    for (int realel = 0; realel &lt; fouritems.size(); realel++) {
          System.out.println("4 elements can be splitted from   :" + fouritems.get(realel));
      }
      headitems2 = new String[fouritems.size()];
      int f = 0;
      for (int realel1 = 0; realel1 &lt; fouritems.size(); realel1++) {
          headitems2 = fouritems.get(realel1).split("\\s+");
          try {
              Item1.add(headitems2[0]);
              System.out.println("Item1   :" + Item1.get(f));
              Item2.add(item1[1]);
              System.out.println("Item2  :" + VendorItem.get(f));
              Item3.add(items3[2]);
              System.out.println("Item3   :" + Item3.get(f));
  
              f++;
          } catch (Exception e) {
          }
      }
  </code></pre>
  
  <p>Any ideas on how I can resolve this?</p>