Examples of ExcelTemplateWriter


Examples of org.beangle.model.transfer.excel.ExcelTemplateWriter

    if (format.equals(TransferFormats.XLS) || format.equals("excel")) {
      String template = (String) context.get("template");
      if (StringUtils.isEmpty(template)) {
        return new ExcelItemWriter();
      } else {
        TemplateWriter writer = new ExcelTemplateWriter();
        URL templateURL = ClassLoaderUtil.getResource(template, Exporter.class);
        if (null == templateURL) {
          throw new RuntimeException("Empty template path!");
        } else {
          writer.setTemplate(templateURL);
        }
        return writer;
      }
    } else if (format.equals(TransferFormats.CSV)) {
      return new CsvItemWriter();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.