7 Replies Latest reply on Feb 23, 2009 8:29 AM by Rene Felgenträger

    Excel generation from dataTable

    Rene Felgenträger Newbie

      Hello all,

      first of all i would like to congratulate nicklas and daniel for their great work in writing the seam-excel api.
      Anyway, i have some comments and suggestions ;-)

      1) The Component excelexporter should have the install annotation with value BUILT IN for easier overwriting of this component. Unfortunately the default install level for missing install annotaion is APPLICATION. Maybe Seam will set the default level to BUILT IN some day....

      2) So far, all the columns are evaluated for the excel-sheet generation. But the datatable in the frontend might have more information (columns) than u actually need in your excel file, for instance the so called action/detail buttons/links. It would be nice that the api would evaluate the isRendered attribute of the UIColumn.

      From my point of view it would be nice to have a mehtod like this for easier extension:

              // Processes the columns
           List<javax.faces.component.UIColumn> columns = this.getColumnsToProcess(dataTable);
            * @return a list of columns to process for workbook generation
           protected List<javax.faces.component.UIColumn> getColumnsToProcess(UIData dataTable) {
                List<javax.faces.component.UIColumn> columns = new ArrayList<javax.faces.component.UIColumn>(0);
                //Avoidance of CME
                for (javax.faces.component.UIColumn _column : ExcelComponent.getChildrenOfType(dataTable.getChildren(), javax.faces.component.UIColumn.class)) {
                     if (_column.isRendered()) {
                return columns;

      3) Instead of throwing an exception i would love to have an empty xls file. In general the Exception-Handling should be custimizable like the Asynchronous-Dispatcher.

      Still, you guys did a great job!


      PS: how is it possible to contribute code or join you guys in developing this api (sorry for this newbie question, but i am a newbie ;-))