code: public String[] getRow(int i, SimpleDateFormat df)
      {
          String[] ret = null;
  
          if(sheet != null)
          {
              Cell[] row = sheet.getRow(i);
              if(row != null)
              {
                  ret = new String[row.length];
                  for(int j = 0; j < row.length; j++)
                  {
                      Cell c = row[j];
                      String value = c.getContents();
                      if(c instanceof DateCell)
                      {
                          DateCell dc = (DateCell)c;
                          long dt = dc.getDate().getTime();
                          if(dt > 0L) // avoid hh:mm:ss 
                          {
                              if(value.length() > 8)
                                  value = df.format(dc.getDate());
                          }
                          else
                          {
                              // Workaround for a bug in the handling of time fields
                              double d = (dt/86400000d)+25569;
                              dt = (long)(d*86400000d);
                              value = df.format(new Date(dt+1L)); // Add 1ms for rounding errors
                          }
                      }
                      ret[j] = value;
                  }
              }
          }
  
          return ret;
      }
docs: Returns the array of columns for the given row in this worksheet.
  @param i The index of the row in the worksheet
  @param df The date format to use for date columns
  @return The array of columns for the given row in this worksheet