title: Excel cell format from jasper report with spring
body: <p>We have an inhouse legacy java library to generate reports with jasper+spring and export them to html, pdf or xls.
  However excel files have all the cells with the same (no ) format
  We have one report where one column is filled with text and there is concern that it could be interpreted as formula with numeric values or some other type of code. Likewise we have strings with leading zeroes that should appear in the report.
  I have tried setting JExcelApiExporterParameter.IS_DETECT_CELL_TYPE to true through jasperExportParameters.</p>
  
  <p>The report configuration is done through xml like the following:</p>
  
  <pre><code>&lt;bean id="jasperReportHeader" class="java.lang.String"&gt;
      &lt;constructor-arg&gt;
          &lt;value&gt;
          &lt;![CDATA[
              &lt;html&gt;
          ]]&gt;
          &lt;/value&gt;
      &lt;/constructor-arg&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jasperExportParameters" class="java.util.HashMap"&gt;
      &lt;constructor-arg&gt;
          &lt;map&gt;
              &lt;entry
                    key="net.sf.jasperreports.engine.export.JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN"
                  value="false" /&gt;
              &lt;entry
                  key="net.sf.jasperreports.engine.export.JRHtmlExporterParameter.IMAGES_URI"&gt;
                  &lt;value&gt;&lt;![CDATA[utils.jasper?opcion=muestraImagen&amp;image=]]&gt;&lt;/value&gt;
              &lt;/entry&gt;
              &lt;entry
                  key="net.sf.jasperreports.engine.export.JRHtmlExporterParameter.HTML_HEADER"&gt;
                  &lt;ref bean="jasperReportHeader" /&gt;
              &lt;/entry&gt;
              &lt;entry
                  key="net.sf.jasperreports.engine.export.JRHtmlExporterParameter.HTML_FOOTER"&gt;
                  &lt;ref bean="jasperReportFooter" /&gt;
              &lt;/entry&gt;
              &lt;entry
                  key="net.sf.jasperreports.engine.export.JRCsvExporterParameter.FIELD_DELIMITER"
                  value="|" /&gt;
              &lt;entry
                  key="net.sf.jasperreports.engine.export.JExcelApiExporterParameter.IS_DETECT_CELL_TYPE"
                  value="true" /&gt;
          &lt;/map&gt;
      &lt;/constructor-arg&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jasperReportFooter" class="java.lang.String"&gt;
      &lt;constructor-arg&gt;
          &lt;value&gt;
          &lt;![CDATA[
        &lt;/html&gt;
          ]]&gt;
          &lt;/value&gt;
      &lt;/constructor-arg&gt;
  &lt;/bean&gt;
  
  &lt;!-- REPORTES --&gt;
  
  &lt;bean id="solicitudRevisionView"
      class="mx.org.rfe.ife.siirfe.comun.web.spring.views.jasper.CustomJasperReportsMultiFormatView"&gt;
      &lt;property name="url" value="/WEB-INF/reportes/SOLICITUD_REVISION.jasper" /&gt;
      &lt;property name="exporterParameters" ref="jasperExportParameters" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>How can I tell jasper to format cells with text format? 
  is it doable at all?</p>
  
  <p>This library is using jasper 4.6.0, but I could migrate if that is what is needed.
  Our reports have been edited with iReport 3.7.6.</p>