title: Wrong value / Number stored as Text - Apache POI
body: <p>I'm working on an application which get data from excel file and output one excel after few operations.
  I got 2 issues, the first one is that one :</p>
  
  <p>On my main excel file, I have this value <code>170299024773</code> and in Excel it's appear like that <code>1.703E+11</code> and then on the output file I get <code>1.70299E+11</code> and the exact value is <code>170299000000</code>. 
  So as you see, it's not the value of the main file. 
  Morever, for this cell, I have the error "Number stored as text", and then I fix this error from Excel I got <code>1.70E+11</code>.</p>
  
  <p>I saw few tips about the Nember stored a text and in particular DataFormatter but it's doesn't change anything in my case</p>
  
  <p>The code I use to get data of excel sheet to array :</p>
  
  <pre><code>private static String[][] sheetToArray(org.apache.poi.ss.usermodel.Sheet sheet, int nbCol){
      String[][] tmp = new String[sheet.getLastRowNum()+1][nbCol];
  
          for (int i = 0; i &lt; sheet.getLastRowNum()+1; i++) { //Config1 to array
              Row row = sheet.getRow(i);
              DataFormatter df = new DataFormatter();
                  for (int j = 0; j &lt; nbCol; j++) {
                      Cell cellC1 = row.getCell(j);
                       tmp[i][j] = df.formatCellValue(cellC1);
                  }
              }
          return tmp;
      }
  </code></pre>
  
  <p>Many thanks in advance guys...</p>
  
  <p>Edit : I fix the wrong value adding </p>
  
  <pre><code>switch (cellD2.getCellTypeEnum()){
         case STRING:
               tmp[i][j] = df.formatCellValue(cellC1);
               break;
          case NUMERIC:
               tmp[i][j] = String.valueOf(cellC1.getNumericCellValue());
          }
   }
  </code></pre>
  
  <p>But now, I have some decimal value added to my numeric state... To solve it I should use DataFormatter but in that case I will lost the right data </p>