Package loxia.support.excel

Examples of loxia.support.excel.ExcelWriter


   * @param showAll
   */
  public static void outputExcel(OutputStream os, InputStream is, TableModel tableModel, boolean showAll){
    assert is != null : "Input template is not found";
    ExcelManipulatorDefinition definition = generateDefinition(tableModel);
    ExcelWriter excelWriter = new DefaultExcelWriter();
    excelWriter.setDefinition(definition);
   
    Map<String,Object> beans = new HashMap<String, Object>();
    beans.put("title", tableModel.getModelName());
    for(int i=0; i< tableModel.getColumnNames().length; i++){
      beans.put("__column" + (i+1), tableModel.getColumnNames()[i]);   
    }
    beans.put("__columns", tableModel.getItems());
    excelWriter.write(is, os, beans);
  }
View Full Code Here

TOP

Related Classes of loxia.support.excel.ExcelWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.