title: Apache poi 5.2.2 string cell type
body: <p>In the documentation, from apache poi 5 cell.setCellType is deprecated, and according to the documentation, the library will handle different types itself, but i have  the strange thing that is happening. When i try to put a string into a cell i always have (after i open the excel) a number type inside of the cell it instead text, no matter which implementation of workbook i`m using. I have tried with all available and the result is the same. So i took a look of implementation of XSSFCell(because currently i use XSSFWordBook) and i saw the following:</p>
  <pre><code>CellType cellType = getCellType();
      if (cellType == CellType.FORMULA) {
          _cell.setV(str.getString());
          _cell.setT(STCellType.STR);
      } else {
          if(_cell.getT() == STCellType.INLINE_STR) {
              //set the 'pre-evaluated result
              _cell.setV(str.getString());
          } else {
              _cell.setT(STCellType.S);
              XSSFRichTextString rt = (XSSFRichTextString)str;
              rt.setStylesTableReference(_stylesSource);
              int sRef = _sharedStringSource.addSharedStringItem(rt);
              _cell.setV(Integer.toString(sRef));
          }
      }
  </code></pre>
  <p>so it always convert the text into &quot;RichTextString&quot; object, and after that it is entering
  in the else condition. Can someone explain me how i can put the type of the cell to be</p>
  <blockquote>
  <p>STCellType.INLINE_STR</p>
  </blockquote>
  <p>in order to avoid this converting to Integer.</p>
  <p>P.S. keep in mind that also tried to use the deprecated</p>
  <blockquote>
  <p>setCellType</p>
  </blockquote>
  <p>and again it is converted to integer or it is entering in the else code block</p>