0 Replies Latest reply on Mar 18, 2009 8:32 AM by aboo salimon

    RichTable Header is not Displaying when i export it into exc

    aboo salimon Newbie

      i am working in exporting the data table values in excel sheet ... ya i can able t those data table values... but i cant get the data table header along with that values in excel... how can i get it please...




      exporting excel sheet button

      <h:commandButton id="exportId" type="submit" value="Export to excel"
      action="#{org.jboss.seam.excel.exporter.excelExporter.export('lodgingChargeform:lodgingChargelistId','jxl')}" />


      data table:


      <rich:dataTable id="lodgingChargelistId" var="lodgingCharge" value="#{financialReports.getLodgingCharges()}" rows="#{financialReportsSearchData.recordsPerPage}" width="100%" columnClasses="align-center,align-left,align-right,align-right,align-right,align-right">
      <f:facet name="header">
      <rich:columnGroup>
      <rich:column>
      <h:outputText value="Reference No." />
      </rich:column>
      <rich:column>
      <h:outputText value="Room No." />
      </rich:column>
      <rich:column>
      <h:outputText value="Surcharges" />
      </rich:column>
      <rich:column>
      <h:outputText value="Tax" />
      </rich:column>
      <rich:column>
      <h:outputText value="Discount" />
      </rich:column>
      <rich:column>
      <h:outputText value="Lodging" />
      </rich:column>

      </rich:columnGroup>
      </f:facet>

      <rich:column>
      <h:outputText value="#{lodgingCharge.referenceNumber}" />
      </rich:column>
      <rich:column>
      <h:outputText value="#{lodgingCharge.roomNo}" />
      </rich:column>
      <rich:column>
      <h:outputText value="#{lodgingCharge.surcharges}" />
      </rich:column>
      <rich:column>
      <h:outputText value="#{lodgingCharge.taxes}" />
      </rich:column>
      <rich:column>
      <h:outputText value="#{lodgingCharge.discount}"/>
      </rich:column>
      <rich:column>
      <h:outputText value="#{lodgingCharge.charges}"/>
      </rich:column>
      <f:facet name="footer">
      <rich:columnGroup>
      <rich:column style="background-color:#DAD4D4;border-right:1px solid #C0C0C0;border-left:1px solid #C0C0C0;">
      <h:outputText value=""></h:outputText>
      </rich:column>
      <rich:column style="background-color:#DAD4D4;border-left:1px solid #DAD4D4;text-align:right;">
      <h:outputText value=" Totals"></h:outputText>
      </rich:column>
      <rich:column style="background-color:#DAD4D4;text-align:right">
      <h:outputText value="#{systemUtils.formatDecimal(financialReports.totalSurCharges, selectedInstance.currencyFormat.businessValue)}" style="color:black;font-weight:bold;height:25px;" ></h:outputText>
      </rich:column>
      <rich:column style="background-color:#DAD4D4;text-align:right">
      <h:outputText value="#{systemUtils.formatDecimal(financialReports.totalTax, selectedInstance.currencyFormat.businessValue)}" style="color:black;font-weight:bold;height:25px;"></h:outputText>
      </rich:column>
      <rich:column style="background-color:#DAD4D4;text-align:right">
      <h:outputText value="#{systemUtils.formatDecimal(financialReports.totalDiscount, selectedInstance.currencyFormat.businessValue)}" style="color:black;font-weight:bold;height:25px;"></h:outputText>
      </rich:column>
      <rich:column style="background-color:#DAD4D4;text-align:right">
      <h:outputText value="#{systemUtils.formatDecimal(financialReports.totalCharges, selectedInstance.currencyFormat.businessValue)}" style="color:black;font-weight:bold;height:25px;"></h:outputText>
      </rich:column>
      </rich:columnGroup>
      </f:facet>
      </rich:dataTable>