1 Reply Latest reply on Mar 10, 2009 11:52 PM by Nicklas Karlsson

    Seam excel : "A worksheet's value must be an Iterable, DataModel or Query"

    Bob Mauranne Newbie

      I would like to export a rich:datatable to an Excel file like in the seam-excel example but i keep getting
      "org.jboss.seam.excel.ExcelWorkbookException: A worksheet's value must be an Iterable, DataModel or Query"

      Here's the service feeding the datatable
      public class PrevisionHydroServiceBO implements PrevisionHydroServiceBS {

           private PrevisionHydroDAS previsionHydroDAS;

           private Map<String, String> previsions;

      // blabla

      public void populatePrevisionList() {
      // ...

      my datatable
      `<r:dataTable id="table_previsions" value="#{previsions}" var="prev" rows="48">
         <f:facet name="header">
          <h:outputText value="Tranche Horaire" />
         <h:outputText value="#{prev.key}" />
         <f:facet name="header">
           <h:outputText value="Prévision KW" />
         <h:outputText value="#{prev.value}" />

      the command button
      `<h:commandButton action="#{excelExporter.export('table_previsions')}" />`
      My button is in a <form> scope but not my datatable, but that's not the cause of the problem i think.

      The exception says that i need to feed the seam excel with a datamodel, but my map is tagged @datamodel, so that's not so helpful.

      I am relatively new at web developpement, so the problem might be any dumb mistake, and i am sorry if it is.

      If someone could help me, i'd be grateful.


      ps : sorry, it seems that the markups are not working