title: How to remove warning in Excel using apache poi in JAVA?
body: <p>I am using <code>apache poi api</code> to generate Excel sheet in my application in java. Data that are set in excel are coming dynamically with type string. <strong>For column1, values are alphanumeric</strong>. When I generate Excel, it will give me green indication with warning <strong>"Number Stored as Text"</strong> or <strong>"Text date with 2-digit year"</strong> on cell.</p>
  
  <p>I want to remove that warning.
  I found that from excel we can flag a cell as 'ignore error', to ignore the warning.</p>
  
  <p>How to do it programmatically or is there any other alternative to achieve this task ?</p>
  
  <p>I also have attached screenshot that shows warning with green mark.</p>
  
  <p><img src="https://i.stack.imgur.com/BpbfW.png" alt="enter image description here"></p>
  
  <p>Code : </p>
  
  <pre><code>if (cellValue != null &amp;&amp; (shouldBeRightAlign))
  {
   cellType = Cell.CELL_TYPE_NUMERIC;
  }
  else if (cellValue != null)
  {
   cellType = Cell.CELL_TYPE_STRING;
  }
  cell.setCellValue(cellValue);
  </code></pre>