5 Replies Latest reply: May 15, 2014 2:55 AM by vinaykumar2 RSS

    Export table to Excel in Oracle ADF geting only first row in excell for selected values

    Tshifhiwa

      hi am trying to follow this sample ,my problem is when i click the selected row in order to display only seleted rows am only geting the first row in excell,but if i what to display all rows in table its ok i can export tham all to excell,another thing if i search and certain record and what to display selected row and click file>allRows i do get selected rows in excell but if i select file>SelectedRows i only get first row of selected rows, and when i run application in IE it download excell page minimize i have to maximize to see the whole data

       

      am in jdeveloper 11.1.1.7.0

      Export table to Excel in Oracle ADF | Waslley Souza Blog

       

      this is my jsff

       

      <?xml version='1.0' encoding='UTF-8'?>

      <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"

                xmlns:af="http://xmlns.oracle.com/adf/faces/rich"

                xmlns:f="http://java.sun.com/jsf/core">

        <af:panelStretchLayout id="psl1">

          <f:facet name="center">

            <af:panelHeader text="Manage Branch Code" id="ph1">

              <f:facet name="context"/>

              <f:facet name="menuBar"/>

              <f:facet name="toolbar"/>

              <f:facet name="legend"/>

              <f:facet name="info"/>

              <af:panelCollection id="pc1">

                <f:facet name="menus">

                  <af:menu text="File" id="m1">

       

       

      <af:commandMenuItem text="Export To Excell(All Rows)" id="cmi1">

                      <af:exportCollectionActionListener exportedId="tBranchCode"

                                                         type="excelHTML"

                                                         filename="BranchCode.xls"

                                                         title="AllBranchCode"/>

                    </af:commandMenuItem>

                    <af:commandMenuItem text="Export To Excell(Selected Rows)" id="cmi2">

                      <af:exportCollectionActionListener exportedId="tBranchCode"

                                                         type="excelHTML"

                                                         exportedRows="selected"

                                                         filename="SelectedBranchCode.xls"

                                                         title="SelectedBranchCode"/>

                    </af:commandMenuItem>

                    <af:commandMenuItem text="Show as Printable Page" id="cmi3">

                      <af:showPrintablePageBehavior/>

                    </af:commandMenuItem>

                  </af:menu>

                </f:facet>

                <f:facet name="toolbar">

                  <af:toolbar id="t1">

                    <af:commandButton actionListener="#{bindings.CreateInsert.execute}"

                                      text="CreateInsert"

                                      id="cb1"/>

                    <af:commandButton actionListener="#{bindings.Commit.execute}"

                                      text="Save"

                                      id="cb2"/>

                    <af:quickQuery label="Search" searchDesc="Search" id="qryId1"

                                   value="#{bindings.ImplicitViewCriteriaQuery.quickQueryDescriptor}"

                                   model="#{bindings.ImplicitViewCriteriaQuery.queryModel}"

                                   queryListener="#{bindings.ImplicitViewCriteriaQuery.processQuery}">

                      <f:facet name="end">

                        <af:commandLink text="Advanced" id="cl1"/>

                      </f:facet>

                    </af:quickQuery>

                  </af:toolbar>

                </f:facet>

                <f:facet name="statusbar"/>

                <af:table value="#{bindings.BranchesView1.collectionModel}" var="row"

                          rows="#{bindings.BranchesView1.rangeSize}"

                          emptyText="#{bindings.BranchesView1.viewable ? 'No data to display.' : 'Access Denied.'}"

                          fetchSize="#{bindings.BranchesView1.rangeSize}"

                          rowBandingInterval="0"

                          selectedRowKeys="#{bindings.BranchesView1.collectionModel.selectedRow}"

                          selectionListener="#{bindings.BranchesView1.collectionModel.makeCurrent}"

                          rowSelection="single" id="tBranchCode" columnStretching="last"

                          partialTriggers="::cb1 ::qryId1" immediate="false"

                          columnResizing="enabled" autoHeightRows="10">

                  <af:column sortProperty="#{bindings.BranchesView1.hints.BranchAd.name}"

                             sortable="true"

                             headerText="#{bindings.BranchesView1.hints.BranchAd.label}"

                             id="c13" width="50">

                    <af:inputText value="#{row.bindings.BranchAd.inputValue}"

                                  label="#{bindings.BranchesView1.hints.BranchAd.label}"

                                  required="#{bindings.BranchesView1.hints.BranchAd.mandatory}"

                                  columns="#{bindings.BranchesView1.hints.BranchAd.displayWidth}"

                                  maximumLength="#{bindings.BranchesView1.hints.BranchAd.precision}"

                                  shortDesc="#{bindings.BranchesView1.hints.BranchAd.tooltip}"

                                  id="it11" autoSubmit="true">

                      <f:validator binding="#{row.bindings.BranchAd.validator}"/>

                      <af:convertNumber groupingUsed="false"

                                        pattern="#{bindings.BranchesView1.hints.BranchAd.format}"/>

                    </af:inputText>

                  </af:column>

                  <af:column sortProperty="#{bindings.BranchesView1.hints.BranchCode.name}"

                             sortable="true"

                             headerText="#{bindings.BranchesView1.hints.BranchCode.label}"

                             id="c8">

                    <af:inputText value="#{row.bindings.BranchCode.inputValue}"

                                  label="#{bindings.BranchesView1.hints.BranchCode.label}"

                                  required="#{bindings.BranchesView1.hints.BranchCode.mandatory}"

                                  columns="#{bindings.BranchesView1.hints.BranchCode.displayWidth}"

                                  maximumLength="#{bindings.BranchesView1.hints.BranchCode.precision}"

                                  shortDesc="#{bindings.BranchesView1.hints.BranchCode.tooltip}"

                                  id="it4" autoSubmit="true">

                      <f:validator binding="#{row.bindings.BranchCode.validator}"/>

                    </af:inputText>

                  </af:column>

                  <af:column sortProperty="#{bindings.BranchesView1.hints.BranchName.name}"

                             sortable="true"

                             headerText="#{bindings.BranchesView1.hints.BranchName.label}"

                             id="c2" width="250">

                    <af:inputText value="#{row.bindings.BranchName.inputValue}"

                                  label="#{bindings.BranchesView1.hints.BranchName.label}"

                                  required="#{bindings.BranchesView1.hints.BranchName.mandatory}"

                                  columns="100"

                                  maximumLength="#{bindings.BranchesView1.hints.BranchName.precision}"

                                  shortDesc="#{bindings.BranchesView1.hints.BranchName.tooltip}"

                                  id="it2">

                      <f:validator binding="#{row.bindings.BranchName.validator}"/>

                    </af:inputText>

                  </af:column>

                  <af:column sortProperty="#{bindings.BranchesView1.hints.BranchAddressLine1.name}"

                             sortable="true"

                             headerText="#{bindings.BranchesView1.hints.BranchAddressLine1.label}"

                             id="c7" width="300">

                    <af:inputText value="#{row.bindings.BranchAddressLine1.inputValue}"

                                  label="#{bindings.BranchesView1.hints.BranchAddressLine1.label}"

                                  required="#{bindings.BranchesView1.hints.BranchAddressLine1.mandatory}"

                                  columns="250"

                                  maximumLength="#{bindings.BranchesView1.hints.BranchAddressLine1.precision}"

                                  shortDesc="#{bindings.BranchesView1.hints.BranchAddressLine1.tooltip}"

                                  id="it6">

                      <f:validator binding="#{row.bindings.BranchAddressLine1.validator}"/>

                    </af:inputText>

                  </af:column>

                  <af:column sortProperty="#{bindings.BranchesView1.hints.BranchAddressLine2.name}"

                             sortable="true"

                             headerText="#{bindings.BranchesView1.hints.BranchAddressLine2.label}"

                             id="c3" width="350">

                    <af:inputText value="#{row.bindings.BranchAddressLine2.inputValue}"

                                  label="#{bindings.BranchesView1.hints.BranchAddressLine2.label}"

                                  required="#{bindings.BranchesView1.hints.BranchAddressLine2.mandatory}"

                                  columns="300"

                                  maximumLength="#{bindings.BranchesView1.hints.BranchAddressLine2.precision}"

                                  shortDesc="#{bindings.BranchesView1.hints.BranchAddressLine2.tooltip}"

                                  id="it1">

                      <f:validator binding="#{row.bindings.BranchAddressLine2.validator}"/>

                    </af:inputText>

                  </af:column>

                  <af:column sortProperty="#{bindings.BranchesView1.hints.BranchCityCode.name}"

                             sortable="true"

                             headerText="#{bindings.BranchesView1.hints.BranchCityCode.label}"

                             id="c12">

                    <af:inputText value="#{row.bindings.BranchCityCode.inputValue}"

                                  label="#{bindings.BranchesView1.hints.BranchCityCode.label}"

                                  required="#{bindings.BranchesView1.hints.BranchCityCode.mandatory}"

                                  columns="#{bindings.BranchesView1.hints.BranchCityCode.displayWidth}"

                                  maximumLength="#{bindings.BranchesView1.hints.BranchCityCode.precision}"

                                  shortDesc="#{bindings.BranchesView1.hints.BranchCityCode.tooltip}"

                                  id="it5">

                      <f:validator binding="#{row.bindings.BranchCityCode.validator}"/>

                      <af:convertNumber groupingUsed="false"

                                        pattern="#{bindings.BranchesView1.hints.BranchCityCode.format}"/>

                    </af:inputText>

                  </af:column>

                  <af:column sortProperty="#{bindings.BranchesView1.hints.BranchSuburb.name}"

                             sortable="true"

                             headerText="#{bindings.BranchesView1.hints.BranchSuburb.label}"

                             id="c9" width="200">

                    <af:inputText value="#{row.bindings.BranchSuburb.inputValue}"

                                  label="#{bindings.BranchesView1.hints.BranchSuburb.label}"

                                  required="#{bindings.BranchesView1.hints.BranchSuburb.mandatory}"

                                  columns="#{bindings.BranchesView1.hints.BranchSuburb.displayWidth}"

                                  maximumLength="#{bindings.BranchesView1.hints.BranchSuburb.precision}"

                                  shortDesc="#{bindings.BranchesView1.hints.BranchSuburb.tooltip}"

                                  id="it9">

                      <f:validator binding="#{row.bindings.BranchSuburb.validator}"/>

                    </af:inputText>

                  </af:column>

                  <af:column sortProperty="#{bindings.BranchesView1.hints.BranchProvinceCode.name}"

                             sortable="true"

                             headerText="#{bindings.BranchesView1.hints.BranchProvinceCode.label}"

                             id="c11">

                    <af:inputText value="#{row.bindings.BranchProvinceCode.inputValue}"

                                  label="#{bindings.BranchesView1.hints.BranchProvinceCode.label}"

                                  required="#{bindings.BranchesView1.hints.BranchProvinceCode.mandatory}"

                                  columns="#{bindings.BranchesView1.hints.BranchProvinceCode.displayWidth}"

                                  maximumLength="#{bindings.BranchesView1.hints.BranchProvinceCode.precision}"

                                  shortDesc="#{bindings.BranchesView1.hints.BranchProvinceCode.tooltip}"

                                  id="it8">

                      <f:validator binding="#{row.bindings.BranchProvinceCode.validator}"/>

                      <af:convertNumber groupingUsed="false"

                                        pattern="#{bindings.BranchesView1.hints.BranchProvinceCode.format}"/>

                    </af:inputText>

                  </af:column>

                  <af:column sortProperty="#{bindings.BranchesView1.hints.BranchPostalCode.name}"

                             sortable="true"

                             headerText="#{bindings.BranchesView1.hints.BranchPostalCode.label}"

                             id="c5">

                    <af:inputText value="#{row.bindings.BranchPostalCode.inputValue}"

                                  label="#{bindings.BranchesView1.hints.BranchPostalCode.label}"

                                  required="#{bindings.BranchesView1.hints.BranchPostalCode.mandatory}"

                                  columns="#{bindings.BranchesView1.hints.BranchPostalCode.displayWidth}"

                                  maximumLength="#{bindings.BranchesView1.hints.BranchPostalCode.precision}"

                                  shortDesc="#{bindings.BranchesView1.hints.BranchPostalCode.tooltip}"

                                  id="it7">

                      <f:validator binding="#{row.bindings.BranchPostalCode.validator}"/>

                    </af:inputText>

                  </af:column>

                  <af:column sortProperty="#{bindings.BranchesView1.hints.BranchTelephone.name}"

                             sortable="true"

                             headerText="#{bindings.BranchesView1.hints.BranchTelephone.label}"

                             id="c6">

                    <af:inputText value="#{row.bindings.BranchTelephone.inputValue}"

                                  label="#{bindings.BranchesView1.hints.BranchTelephone.label}"

                                  required="#{bindings.BranchesView1.hints.BranchTelephone.mandatory}"

                                  columns="#{bindings.BranchesView1.hints.BranchTelephone.displayWidth}"

                                  maximumLength="#{bindings.BranchesView1.hints.BranchTelephone.precision}"

                                  shortDesc="#{bindings.BranchesView1.hints.BranchTelephone.tooltip}"

                                  id="it3">

                      <f:validator binding="#{row.bindings.BranchTelephone.validator}"/>

                    </af:inputText>

                  </af:column>

                  <af:column sortProperty="#{bindings.BranchesView1.hints.BranchDateActive.name}"

                             sortable="true"

                             headerText="#{bindings.BranchesView1.hints.BranchDateActive.label}"

                             id="c10">

                    <af:inputDate value="#{row.bindings.BranchDateActive.inputValue}"

                                  label="#{bindings.BranchesView1.hints.BranchDateActive.label}"

                                  required="#{bindings.BranchesView1.hints.BranchDateActive.mandatory}"

                                  shortDesc="#{bindings.BranchesView1.hints.BranchDateActive.tooltip}"

                                  id="id2">

                      <f:validator binding="#{row.bindings.BranchDateActive.validator}"/>

                      <af:convertDateTime pattern="#{bindings.BranchesView1.hints.BranchDateActive.format}"/>

                    </af:inputDate>

                  </af:column>

                  <af:column sortProperty="#{bindings.BranchesView1.hints.BranchDateInactive.name}"

                             sortable="true"

                             headerText="#{bindings.BranchesView1.hints.BranchDateInactive.label}"

                             id="c1">

                    <af:inputDate value="#{row.bindings.BranchDateInactive.inputValue}"

                                  label="#{bindings.BranchesView1.hints.BranchDateInactive.label}"

                                  required="#{bindings.BranchesView1.hints.BranchDateInactive.mandatory}"

                                  shortDesc="#{bindings.BranchesView1.hints.BranchDateInactive.tooltip}"

                                  id="id1">

                      <f:validator binding="#{row.bindings.BranchDateInactive.validator}"/>

                      <af:convertDateTime pattern="#{bindings.BranchesView1.hints.BranchDateInactive.format}"/>

                    </af:inputDate>

                  </af:column>

                  <af:column sortProperty="#{bindings.BranchesView1.hints.BranchHub.name}"

                             sortable="true"

                             headerText="#{bindings.BranchesView1.hints.BranchHub.label}"

                             id="c4">

                    <af:inputText value="#{row.bindings.BranchHub.inputValue}"

                                  label="#{bindings.BranchesView1.hints.BranchHub.label}"

                                  required="#{bindings.BranchesView1.hints.BranchHub.mandatory}"

                                  columns="#{bindings.BranchesView1.hints.BranchHub.displayWidth}"

                                  maximumLength="#{bindings.BranchesView1.hints.BranchHub.precision}"

                                  shortDesc="#{bindings.BranchesView1.hints.BranchHub.tooltip}"

                                  id="it10">

                      <f:validator binding="#{row.bindings.BranchHub.validator}"/>

                    </af:inputText>

                  </af:column>

                </af:table>

              </af:panelCollection>

            </af:panelHeader>

            <!-- id="af_one_column_stretched"   -->

          </f:facet>

        </af:panelStretchLayout>

      </jsp:root>

        • 1. Re: Export table to Excel in Oracle ADF geting only first row in excell for selected values
          vinaykumar2

          User please explain ur usecase.You selecting some row then you doing export to excel ?

           

          What is selectFile?

          • 2. Re: Export table to Excel in Oracle ADF geting only first row in excell for selected values
            Tshifhiwa

            when i export to excell , am only geting the first row in excell spreadsheet

             

            selectFile is this

             

            <af:menu text="File" id="m1">

                          <af:commandMenuItem text="Export To Excell(All Rows)" id="cmi1">

                            <af:exportCollectionActionListener exportedId="thubcode"

                                                               type="excelHTML"

                                                               filename="allHubCode.xls"

                                                               title="hubCode"/>

                          </af:commandMenuItem>

                          <af:commandMenuItem text="Export To Excell(Selected Rows)" id="cmi2">

                            <af:exportCollectionActionListener exportedId="thubcode"

                                                               type="excelHTML"

                                                               exportedRows="selected"

                                                               filename="selectedHubCode.xls"

                                                               title="HubCode"/>

                          </af:commandMenuItem>

                          <af:commandMenuItem text="Show as Printable Page" id="cmi3">

                            <af:showPrintablePageBehavior/>

                          </af:commandMenuItem>

                        </af:menu>

            • 4. Re: Export table to Excel in Oracle ADF geting only first row in excell for selected values
              Tshifhiwa

              i did this but still geting only the first row of selected records when exporting to excell

              RichTable empTable;
              public void setEmpTable(RichTable empTable) {
              this.empTable = empTable;
              }

               

               

              public RichTable getEmpTable() {
              return empTable;

              }

               

              and now my table is

              <af:table value="#{bindings.BranchesView1.collectionModel}" var="row"

                                  rows="#{bindings.BranchesView1.rangeSize}"

                                  emptyText="#{bindings.BranchesView1.viewable ? 'No data to display.' : 'Access Denied.'}"

                                  fetchSize="#{bindings.BranchesView1.rangeSize}"

                                  rowBandingInterval="0"

                                  selectedRowKeys="#{bindings.BranchesView1.collectionModel.selectedRow}"

                                  selectionListener="#{bindings.BranchesView1.collectionModel.makeCurrent}"

                                  rowSelection="multiple" id="tBranch" columnStretching="last"

                                  partialTriggers="::cb1 ::qryId1" immediate="false"

                                  columnResizing="enabled" autoHeightRows="10"

                                  binding="#{backingBeanScope.BranchBean.empTable}">

                          <af:column sortProperty="#{bindings.BranchesView1.hints.BranchAd.name}"

                                     sortable="true"

                                     headerText="#{bindings.BranchesView1.hints.BranchAd.label}"

                                     id="c13" width="50">

                            <af:inputText value="#{row.bindings.BranchAd.inputValue}"

                                          label="#{bindings.BranchesView1.hints.BranchAd.label}"

                                          required="#{bindings.BranchesView1.hints.BranchAd.mandatory}"

                                          columns="#{bindings.BranchesView1.hints.BranchAd.displayWidth}"

                                          maximumLength="#{bindings.BranchesView1.hints.BranchAd.precision}"

                                          shortDesc="#{bindings.BranchesView1.hints.BranchAd.tooltip}"

                                          id="it11" autoSubmit="true">

                              <f:validator binding="#{row.bindings.BranchAd.validator}"/>

                              <af:convertNumber groupingUsed="false"

                                                pattern="#{bindings.BranchesView1.hints.BranchAd.format}"/>

                            </af:inputText>

                          </af:column>

                          <af:column sortProperty="#{bindings.BranchesView1.hints.BranchCode.name}"

                                     sortable="true"

                                     headerText="#{bindings.BranchesView1.hints.BranchCode.label}"

                                     id="c8">

                            <af:inputText value="#{row.bindings.BranchCode.inputValue}"

                                          label="#{bindings.BranchesView1.hints.BranchCode.label}"

                                          required="#{bindings.BranchesView1.hints.BranchCode.mandatory}"

                                          columns="#{bindings.BranchesView1.hints.BranchCode.displayWidth}"

                                          maximumLength="#{bindings.BranchesView1.hints.BranchCode.precision}"

                                          shortDesc="#{bindings.BranchesView1.hints.BranchCode.tooltip}"

                                          id="it4" autoSubmit="true">

                              <f:validator binding="#{row.bindings.BranchCode.validator}"/>

                            </af:inputText>

                          </af:column>

                          <af:column sortProperty="#{bindings.BranchesView1.hints.BranchName.name}"

                                     sortable="true"

                                     headerText="#{bindings.BranchesView1.hints.BranchName.label}"

                                     id="c2" width="250">

                            <af:inputText value="#{row.bindings.BranchName.inputValue}"

                                          label="#{bindings.BranchesView1.hints.BranchName.label}"

                                          required="#{bindings.BranchesView1.hints.BranchName.mandatory}"

                                          columns="100"

                                          maximumLength="#{bindings.BranchesView1.hints.BranchName.precision}"

                                          shortDesc="#{bindings.BranchesView1.hints.BranchName.tooltip}"

                                          id="it2">

                              <f:validator binding="#{row.bindings.BranchName.validator}"/>

                            </af:inputText>

                          </af:column>

                          <af:column sortProperty="#{bindings.BranchesView1.hints.BranchAddressLine1.name}"

                                     sortable="true"

                                     headerText="#{bindings.BranchesView1.hints.BranchAddressLine1.label}"

                                     id="c7" width="300">

                            <af:inputText value="#{row.bindings.BranchAddressLine1.inputValue}"

                                          label="#{bindings.BranchesView1.hints.BranchAddressLine1.label}"

                                          required="#{bindings.BranchesView1.hints.BranchAddressLine1.mandatory}"

                                          columns="250"

                                          maximumLength="#{bindings.BranchesView1.hints.BranchAddressLine1.precision}"

                                          shortDesc="#{bindings.BranchesView1.hints.BranchAddressLine1.tooltip}"

                                          id="it6">

                              <f:validator binding="#{row.bindings.BranchAddressLine1.validator}"/>

                            </af:inputText>

                          </af:column>

                          <af:column sortProperty="#{bindings.BranchesView1.hints.BranchAddressLine2.name}"

                                     sortable="true"

                                     headerText="#{bindings.BranchesView1.hints.BranchAddressLine2.label}"

                                     id="c3" width="350">

                            <af:inputText value="#{row.bindings.BranchAddressLine2.inputValue}"

                                          label="#{bindings.BranchesView1.hints.BranchAddressLine2.label}"

                                          required="#{bindings.BranchesView1.hints.BranchAddressLine2.mandatory}"

                                          columns="300"

                                          maximumLength="#{bindings.BranchesView1.hints.BranchAddressLine2.precision}"

                                          shortDesc="#{bindings.BranchesView1.hints.BranchAddressLine2.tooltip}"

                                          id="it1">

                              <f:validator binding="#{row.bindings.BranchAddressLine2.validator}"/>

                            </af:inputText>

                          </af:column>

                          <af:column sortProperty="#{bindings.BranchesView1.hints.BranchCityCode.name}"

                                     sortable="true"

                                     headerText="#{bindings.BranchesView1.hints.BranchCityCode.label}"

                                     id="c12">

                            <af:inputText value="#{row.bindings.BranchCityCode.inputValue}"

                                          label="#{bindings.BranchesView1.hints.BranchCityCode.label}"

                                          required="#{bindings.BranchesView1.hints.BranchCityCode.mandatory}"

                                          columns="#{bindings.BranchesView1.hints.BranchCityCode.displayWidth}"

                                          maximumLength="#{bindings.BranchesView1.hints.BranchCityCode.precision}"

                                          shortDesc="#{bindings.BranchesView1.hints.BranchCityCode.tooltip}"

                                          id="it5">

                              <f:validator binding="#{row.bindings.BranchCityCode.validator}"/>

                              <af:convertNumber groupingUsed="false"

                                                pattern="#{bindings.BranchesView1.hints.BranchCityCode.format}"/>

                            </af:inputText>

                          </af:column>

                          <af:column sortProperty="#{bindings.BranchesView1.hints.BranchSuburb.name}"

                                     sortable="true"

                                     headerText="#{bindings.BranchesView1.hints.BranchSuburb.label}"

                                     id="c9" width="200">

                            <af:inputText value="#{row.bindings.BranchSuburb.inputValue}"

                                          label="#{bindings.BranchesView1.hints.BranchSuburb.label}"

                                          required="#{bindings.BranchesView1.hints.BranchSuburb.mandatory}"

                                          columns="#{bindings.BranchesView1.hints.BranchSuburb.displayWidth}"

                                          maximumLength="#{bindings.BranchesView1.hints.BranchSuburb.precision}"

                                          shortDesc="#{bindings.BranchesView1.hints.BranchSuburb.tooltip}"

                                          id="it9">

                              <f:validator binding="#{row.bindings.BranchSuburb.validator}"/>

                            </af:inputText>

                          </af:column>

                          <af:column sortProperty="#{bindings.BranchesView1.hints.BranchProvinceCode.name}"

                                     sortable="true"

                                     headerText="#{bindings.BranchesView1.hints.BranchProvinceCode.label}"

                                     id="c11">

                            <af:inputText value="#{row.bindings.BranchProvinceCode.inputValue}"

                                          label="#{bindings.BranchesView1.hints.BranchProvinceCode.label}"

                                          required="#{bindings.BranchesView1.hints.BranchProvinceCode.mandatory}"

                                          columns="#{bindings.BranchesView1.hints.BranchProvinceCode.displayWidth}"

                                          maximumLength="#{bindings.BranchesView1.hints.BranchProvinceCode.precision}"

                                          shortDesc="#{bindings.BranchesView1.hints.BranchProvinceCode.tooltip}"

                                          id="it8">

                              <f:validator binding="#{row.bindings.BranchProvinceCode.validator}"/>

                              <af:convertNumber groupingUsed="false"

                                                pattern="#{bindings.BranchesView1.hints.BranchProvinceCode.format}"/>

                            </af:inputText>

                          </af:column>

                          <af:column sortProperty="#{bindings.BranchesView1.hints.BranchPostalCode.name}"

                                     sortable="true"

                                     headerText="#{bindings.BranchesView1.hints.BranchPostalCode.label}"

                                     id="c5">

                            <af:inputText value="#{row.bindings.BranchPostalCode.inputValue}"

                                          label="#{bindings.BranchesView1.hints.BranchPostalCode.label}"

                                          required="#{bindings.BranchesView1.hints.BranchPostalCode.mandatory}"

                                          columns="#{bindings.BranchesView1.hints.BranchPostalCode.displayWidth}"

                                          maximumLength="#{bindings.BranchesView1.hints.BranchPostalCode.precision}"

                                          shortDesc="#{bindings.BranchesView1.hints.BranchPostalCode.tooltip}"

                                          id="it7">

                              <f:validator binding="#{row.bindings.BranchPostalCode.validator}"/>

                            </af:inputText>

                          </af:column>

                          <af:column sortProperty="#{bindings.BranchesView1.hints.BranchTelephone.name}"

                                     sortable="true"

                                     headerText="#{bindings.BranchesView1.hints.BranchTelephone.label}"

                                     id="c6">

                            <af:inputText value="#{row.bindings.BranchTelephone.inputValue}"

                                          label="#{bindings.BranchesView1.hints.BranchTelephone.label}"

                                          required="#{bindings.BranchesView1.hints.BranchTelephone.mandatory}"

                                          columns="#{bindings.BranchesView1.hints.BranchTelephone.displayWidth}"

                                          maximumLength="#{bindings.BranchesView1.hints.BranchTelephone.precision}"

                                          shortDesc="#{bindings.BranchesView1.hints.BranchTelephone.tooltip}"

                                          id="it3">

                              <f:validator binding="#{row.bindings.BranchTelephone.validator}"/>

                            </af:inputText>

                          </af:column>

                          <af:column sortProperty="#{bindings.BranchesView1.hints.BranchDateActive.name}"

                                     sortable="true"

                                     headerText="#{bindings.BranchesView1.hints.BranchDateActive.label}"

                                     id="c10">

                            <af:inputDate value="#{row.bindings.BranchDateActive.inputValue}"

                                          label="#{bindings.BranchesView1.hints.BranchDateActive.label}"

                                          required="#{bindings.BranchesView1.hints.BranchDateActive.mandatory}"

                                          shortDesc="#{bindings.BranchesView1.hints.BranchDateActive.tooltip}"

                                          id="id2">

                              <f:validator binding="#{row.bindings.BranchDateActive.validator}"/>

                              <af:convertDateTime pattern="#{bindings.BranchesView1.hints.BranchDateActive.format}"/>

                            </af:inputDate>

                          </af:column>

                          <af:column sortProperty="#{bindings.BranchesView1.hints.BranchDateInactive.name}"

                                     sortable="true"

                                     headerText="#{bindings.BranchesView1.hints.BranchDateInactive.label}"

                                     id="c1">

                            <af:inputDate value="#{row.bindings.BranchDateInactive.inputValue}"

                                          label="#{bindings.BranchesView1.hints.BranchDateInactive.label}"

                                          required="#{bindings.BranchesView1.hints.BranchDateInactive.mandatory}"

                                          shortDesc="#{bindings.BranchesView1.hints.BranchDateInactive.tooltip}"

                                          id="id1">

                              <f:validator binding="#{row.bindings.BranchDateInactive.validator}"/>

                              <af:convertDateTime pattern="#{bindings.BranchesView1.hints.BranchDateInactive.format}"/>

                            </af:inputDate>

                          </af:column>

                          <af:column sortProperty="#{bindings.BranchesView1.hints.BranchHub.name}"

                                     sortable="true"

                                     headerText="#{bindings.BranchesView1.hints.BranchHub.label}"

                                     id="c4">

                            <af:inputText value="#{row.bindings.BranchHub.inputValue}"

                                          label="#{bindings.BranchesView1.hints.BranchHub.label}"

                                          required="#{bindings.BranchesView1.hints.BranchHub.mandatory}"

                                          columns="#{bindings.BranchesView1.hints.BranchHub.displayWidth}"

                                          maximumLength="#{bindings.BranchesView1.hints.BranchHub.precision}"

                                          shortDesc="#{bindings.BranchesView1.hints.BranchHub.tooltip}"

                                          id="it10">

                              <f:validator binding="#{row.bindings.BranchHub.validator}"/>

                            </af:inputText>

                          </af:column>

                        </af:table>

              • 5. Re: Export table to Excel in Oracle ADF geting only first row in excell for selected values
                vinaykumar2

                remove selected selectedRowKeys property in table..ur table shld be like

                 

                 

                <af:table value="#{bindings.BranchesView1.collectionModel}" var="row"

                                    rows="#{bindings.BranchesView1.rangeSize}"

                                    emptyText="#{bindings.BranchesView1.viewable ? 'No data to display.' : 'Access Denied.'}"

                                    fetchSize="#{bindings.BranchesView1.rangeSize}"

                                    rowBandingInterval="0"

                                    selectionListener="#{bindings.BranchesView1.collectionModel.makeCurrent}"

                                    rowSelection="multiple" id="tBranch" columnStretching="last"

                                    partialTriggers="::cb1 ::qryId1" immediate="false"

                                    columnResizing="enabled" autoHeightRows="10"

                                    binding="#{backingBeanScope.BranchBean.empTable}">

                            <af:column sortProperty="#{bindings.BranchesView1.hints.BranchAd.name}"

                                       sortable="true"

                                       headerText="#{bindings.BranchesView1.hints.BranchAd.label}"

                                       id="c13" width="50">

                              <af:inputText value="#{row.bindings.BranchAd.inputValue}"

                                            label="#{bindings.BranchesView1.hints.BranchAd.label}"

                                            required="#{bindings.BranchesView1.hints.BranchAd.mandatory}"

                                            columns="#{bindings.BranchesView1.hints.BranchAd.displayWidth}"

                                            maximumLength="#{bindings.BranchesView1.hints.BranchAd.precision}"

                                            shortDesc="#{bindings.BranchesView1.hints.BranchAd.tooltip}"

                                            id="it11" autoSubmit="true">

                                <f:validator binding="#{row.bindings.BranchAd.validator}"/>

                                <af:convertNumber groupingUsed="false"

                                                  pattern="#{bindings.BranchesView1.hints.BranchAd.format}"/>

                              </af:inputText>

                            </af:column>

                            <af:column sortProperty="#{bindings.BranchesView1.hints.BranchCode.name}"

                                       sortable="true"

                                       headerText="#{bindings.BranchesView1.hints.BranchCode.label}"

                                       id="c8">

                              <af:inputText value="#{row.bindings.BranchCode.inputValue}"

                                            label="#{bindings.BranchesView1.hints.BranchCode.label}"

                                            required="#{bindings.BranchesView1.hints.BranchCode.mandatory}"

                                            columns="#{bindings.BranchesView1.hints.BranchCode.displayWidth}"

                                            maximumLength="#{bindings.BranchesView1.hints.BranchCode.precision}"

                                            shortDesc="#{bindings.BranchesView1.hints.BranchCode.tooltip}"

                                            id="it4" autoSubmit="true">

                                <f:validator binding="#{row.bindings.BranchCode.validator}"/>

                              </af:inputText>

                            </af:column>

                            <af:column sortProperty="#{bindings.BranchesView1.hints.BranchName.name}"

                                       sortable="true"

                                       headerText="#{bindings.BranchesView1.hints.BranchName.label}"

                                       id="c2" width="250">

                              <af:inputText value="#{row.bindings.BranchName.inputValue}"

                                            label="#{bindings.BranchesView1.hints.BranchName.label}"

                                            required="#{bindings.BranchesView1.hints.BranchName.mandatory}"

                                            columns="100"

                                            maximumLength="#{bindings.BranchesView1.hints.BranchName.precision}"

                                            shortDesc="#{bindings.BranchesView1.hints.BranchName.tooltip}"

                                            id="it2">

                                <f:validator binding="#{row.bindings.BranchName.validator}"/>

                              </af:inputText>

                            </af:column>

                            <af:column sortProperty="#{bindings.BranchesView1.hints.BranchAddressLine1.name}"

                                       sortable="true"

                                       headerText="#{bindings.BranchesView1.hints.BranchAddressLine1.label}"

                                       id="c7" width="300">

                              <af:inputText value="#{row.bindings.BranchAddressLine1.inputValue}"

                                            label="#{bindings.BranchesView1.hints.BranchAddressLine1.label}"

                                            required="#{bindings.BranchesView1.hints.BranchAddressLine1.mandatory}"

                                            columns="250"

                                            maximumLength="#{bindings.BranchesView1.hints.BranchAddressLine1.precision}"

                                            shortDesc="#{bindings.BranchesView1.hints.BranchAddressLine1.tooltip}"

                                            id="it6">

                                <f:validator binding="#{row.bindings.BranchAddressLine1.validator}"/>

                              </af:inputText>

                            </af:column>

                            <af:column sortProperty="#{bindings.BranchesView1.hints.BranchAddressLine2.name}"

                                       sortable="true"

                                       headerText="#{bindings.BranchesView1.hints.BranchAddressLine2.label}"

                                       id="c3" width="350">

                              <af:inputText value="#{row.bindings.BranchAddressLine2.inputValue}"

                                            label="#{bindings.BranchesView1.hints.BranchAddressLine2.label}"

                                            required="#{bindings.BranchesView1.hints.BranchAddressLine2.mandatory}"

                                            columns="300"

                                            maximumLength="#{bindings.BranchesView1.hints.BranchAddressLine2.precision}"

                                            shortDesc="#{bindings.BranchesView1.hints.BranchAddressLine2.tooltip}"

                                            id="it1">

                                <f:validator binding="#{row.bindings.BranchAddressLine2.validator}"/>

                              </af:inputText>

                            </af:column>

                            <af:column sortProperty="#{bindings.BranchesView1.hints.BranchCityCode.name}"

                                       sortable="true"

                                       headerText="#{bindings.BranchesView1.hints.BranchCityCode.label}"

                                       id="c12">

                              <af:inputText value="#{row.bindings.BranchCityCode.inputValue}"

                                            label="#{bindings.BranchesView1.hints.BranchCityCode.label}"

                                            required="#{bindings.BranchesView1.hints.BranchCityCode.mandatory}"

                                            columns="#{bindings.BranchesView1.hints.BranchCityCode.displayWidth}"

                                            maximumLength="#{bindings.BranchesView1.hints.BranchCityCode.precision}"

                                            shortDesc="#{bindings.BranchesView1.hints.BranchCityCode.tooltip}"

                                            id="it5">

                                <f:validator binding="#{row.bindings.BranchCityCode.validator}"/>

                                <af:convertNumber groupingUsed="false"

                                                  pattern="#{bindings.BranchesView1.hints.BranchCityCode.format}"/>

                              </af:inputText>

                            </af:column>

                            <af:column sortProperty="#{bindings.BranchesView1.hints.BranchSuburb.name}"

                                       sortable="true"

                                       headerText="#{bindings.BranchesView1.hints.BranchSuburb.label}"

                                       id="c9" width="200">

                              <af:inputText value="#{row.bindings.BranchSuburb.inputValue}"

                                            label="#{bindings.BranchesView1.hints.BranchSuburb.label}"

                                            required="#{bindings.BranchesView1.hints.BranchSuburb.mandatory}"

                                            columns="#{bindings.BranchesView1.hints.BranchSuburb.displayWidth}"

                                            maximumLength="#{bindings.BranchesView1.hints.BranchSuburb.precision}"

                                            shortDesc="#{bindings.BranchesView1.hints.BranchSuburb.tooltip}"

                                            id="it9">

                                <f:validator binding="#{row.bindings.BranchSuburb.validator}"/>

                              </af:inputText>

                            </af:column>

                            <af:column sortProperty="#{bindings.BranchesView1.hints.BranchProvinceCode.name}"

                                       sortable="true"

                                       headerText="#{bindings.BranchesView1.hints.BranchProvinceCode.label}"

                                       id="c11">

                              <af:inputText value="#{row.bindings.BranchProvinceCode.inputValue}"

                                            label="#{bindings.BranchesView1.hints.BranchProvinceCode.label}"

                                            required="#{bindings.BranchesView1.hints.BranchProvinceCode.mandatory}"

                                            columns="#{bindings.BranchesView1.hints.BranchProvinceCode.displayWidth}"

                                            maximumLength="#{bindings.BranchesView1.hints.BranchProvinceCode.precision}"

                                            shortDesc="#{bindings.BranchesView1.hints.BranchProvinceCode.tooltip}"

                                            id="it8">

                                <f:validator binding="#{row.bindings.BranchProvinceCode.validator}"/>

                                <af:convertNumber groupingUsed="false"

                                                  pattern="#{bindings.BranchesView1.hints.BranchProvinceCode.format}"/>

                              </af:inputText>

                            </af:column>

                            <af:column sortProperty="#{bindings.BranchesView1.hints.BranchPostalCode.name}"

                                       sortable="true"

                                       headerText="#{bindings.BranchesView1.hints.BranchPostalCode.label}"

                                       id="c5">

                              <af:inputText value="#{row.bindings.BranchPostalCode.inputValue}"

                                            label="#{bindings.BranchesView1.hints.BranchPostalCode.label}"

                                            required="#{bindings.BranchesView1.hints.BranchPostalCode.mandatory}"

                                            columns="#{bindings.BranchesView1.hints.BranchPostalCode.displayWidth}"

                                            maximumLength="#{bindings.BranchesView1.hints.BranchPostalCode.precision}"

                                            shortDesc="#{bindings.BranchesView1.hints.BranchPostalCode.tooltip}"

                                            id="it7">

                                <f:validator binding="#{row.bindings.BranchPostalCode.validator}"/>

                              </af:inputText>

                            </af:column>

                            <af:column sortProperty="#{bindings.BranchesView1.hints.BranchTelephone.name}"

                                       sortable="true"

                                       headerText="#{bindings.BranchesView1.hints.BranchTelephone.label}"

                                       id="c6">

                              <af:inputText value="#{row.bindings.BranchTelephone.inputValue}"

                                            label="#{bindings.BranchesView1.hints.BranchTelephone.label}"

                                            required="#{bindings.BranchesView1.hints.BranchTelephone.mandatory}"

                                            columns="#{bindings.BranchesView1.hints.BranchTelephone.displayWidth}"

                                            maximumLength="#{bindings.BranchesView1.hints.BranchTelephone.precision}"

                                            shortDesc="#{bindings.BranchesView1.hints.BranchTelephone.tooltip}"

                                            id="it3">

                                <f:validator binding="#{row.bindings.BranchTelephone.validator}"/>

                              </af:inputText>

                            </af:column>

                            <af:column sortProperty="#{bindings.BranchesView1.hints.BranchDateActive.name}"

                                       sortable="true"

                                       headerText="#{bindings.BranchesView1.hints.BranchDateActive.label}"

                                       id="c10">

                              <af:inputDate value="#{row.bindings.BranchDateActive.inputValue}"

                                            label="#{bindings.BranchesView1.hints.BranchDateActive.label}"

                                            required="#{bindings.BranchesView1.hints.BranchDateActive.mandatory}"

                                            shortDesc="#{bindings.BranchesView1.hints.BranchDateActive.tooltip}"

                                            id="id2">

                                <f:validator binding="#{row.bindings.BranchDateActive.validator}"/>

                                <af:convertDateTime pattern="#{bindings.BranchesView1.hints.BranchDateActive.format}"/>

                              </af:inputDate>

                            </af:column>

                            <af:column sortProperty="#{bindings.BranchesView1.hints.BranchDateInactive.name}"

                                       sortable="true"

                                       headerText="#{bindings.BranchesView1.hints.BranchDateInactive.label}"

                                       id="c1">

                              <af:inputDate value="#{row.bindings.BranchDateInactive.inputValue}"

                                            label="#{bindings.BranchesView1.hints.BranchDateInactive.label}"

                                            required="#{bindings.BranchesView1.hints.BranchDateInactive.mandatory}"

                                            shortDesc="#{bindings.BranchesView1.hints.BranchDateInactive.tooltip}"

                                            id="id1">

                                <f:validator binding="#{row.bindings.BranchDateInactive.validator}"/>

                                <af:convertDateTime pattern="#{bindings.BranchesView1.hints.BranchDateInactive.format}"/>

                              </af:inputDate>

                            </af:column>

                            <af:column sortProperty="#{bindings.BranchesView1.hints.BranchHub.name}"

                                       sortable="true"

                                       headerText="#{bindings.BranchesView1.hints.BranchHub.label}"

                                       id="c4">

                              <af:inputText value="#{row.bindings.BranchHub.inputValue}"

                                            label="#{bindings.BranchesView1.hints.BranchHub.label}"

                                            required="#{bindings.BranchesView1.hints.BranchHub.mandatory}"

                                            columns="#{bindings.BranchesView1.hints.BranchHub.displayWidth}"

                                            maximumLength="#{bindings.BranchesView1.hints.BranchHub.precision}"

                                            shortDesc="#{bindings.BranchesView1.hints.BranchHub.tooltip}"

                                            id="it10">

                                <f:validator binding="#{row.bindings.BranchHub.validator}"/>

                              </af:inputText>

                            </af:column>

                          </af:table>