Examples of Excel


Examples of org.jab.docsearch.converters.Excel

                        curSummary = word.getSummary();
                        documentText = word.getText();
                        break;
                    }
                    case MS_EXCEL: {
                        Excel excel = new Excel(currentFi);
                        excel.parse();

                        author = excel.getAuthor();
                        keyWords = excel.getKeywords();
                        curTitle = excel.getTitle();
                        curSummary = excel.getSummary();
                        documentText = excel.getText();
                        break;
                    }
                    case PDF: {
                        // TODO check if the new multivalent version is better than PDF Box
                        PDFConverter converter = new PDFConverter(currentFi);
View Full Code Here

Examples of org.jeecgframework.poi.excel.annotation.Excel

   * @throws Exception
   */
  private static void addEntityToMap(String targetId, Field field,
      ExcelImportEntity excelEntity, Class<?> pojoClass,
      List<Method> getMethods, Map<String, ExcelImportEntity> temp) throws Exception {
    Excel excel = field.getAnnotation(Excel.class);
    excelEntity = new ExcelImportEntity();
    excelEntity.setType(excel.exportType());
    excelEntity.setSaveUrl(excel.savePath());
    excelEntity.setSaveType(excel.imageType());
    getExcelField(targetId, field, excelEntity, excel, pojoClass);
    if (getMethods != null) {
      List<Method> newMethods = new ArrayList<Method>();
      newMethods.addAll(getMethods);
      newMethods.add(excelEntity.getSetMethod());
View Full Code Here

Examples of org.jeecgframework.poi.excel.annotation.Excel

        excelEntity.setGetMethod(ExcelPublicUtil.getMethod(
            field.getName(), pojoClass));
        excelEntity.setList(list);
        excelParams.add(excelEntity);
      } else if (ExcelPublicUtil.isJavaClass(field)) {
        Excel excel = field.getAnnotation(Excel.class);
        excelEntity = new ExcelExportEntity();
        excelEntity.setType(excel.exportType());
        getExcelField(targetId, field, excelEntity, excel, pojoClass);
        if (getMethods != null) {
          List<Method> newMethods = new ArrayList<Method>();
          newMethods.addAll(getMethods);
          newMethods.add(excelEntity.getGetMethod());
View Full Code Here

Examples of org.jeecgframework.poi.excel.annotation.Excel

      Field field = fields[i];
      if (ExcelPublicUtil.isNotUserExcelUserThis(field, targetId)) {
        continue;
      }
      if (ExcelPublicUtil.isJavaClass(field)) {
        Excel excel = field.getAnnotation(Excel.class);
        excelEntity = new ExcelExportEntity();
        getExcelField(targetId, field, excelEntity, excel, pojoClass);
        if (getMethods != null) {
          List<Method> newMethods = new ArrayList<Method>();
          newMethods.addAll(getMethods);
View Full Code Here

Examples of org.jeecgframework.poi.excel.annotation.Excel

      Map<String, Method> fieldSetConvertMap = new HashMap<String, Method>();
      // 循环读取所有字段
      for (int i = 0; i < filed.length; i++) {
        Field f = filed[i];
        // 得到单个字段上的Annotation
        Excel excel = f.getAnnotation(Excel.class);
        // 如果标识了Annotationd的话
        if (excel != null) {
          // 构造设置了Annotation的字段的Setter方法
          String fieldname = f.getName();
          String setMethodName = "set" + fieldname.substring(0, 1).toUpperCase() + fieldname.substring(1);
          // 构造调用的method,
          Method setMethod = pojoClass.getMethod(setMethodName, new Class[] { f.getType() });
          // 将这个method以Annotaion的名字为key来存入。
          // 对于重名将导致 覆盖 失败,对于此处的限制需要
          fieldSetMap.put(excel.exportName(), setMethod);
          if (excel.importConvertSign() == 1) {
            //----------------------------------------------------------------
            //update-begin--Author:Quainty  Date:20130524 for:[8]excel导出时间问题
            // 用get/setXxxxConvert方法名的话, 由于直接使用了数据库绑定的Entity对象,注入会有冲突
            StringBuffer setConvertMethodName = new StringBuffer("convertSet");
            setConvertMethodName.append(fieldname.substring(0, 1).toUpperCase());
            setConvertMethodName.append(fieldname.substring(1));
            //update-end--Author:Quainty  Date:20130524 for:[8]excel导出时间问题
            //----------------------------------------------------------------
            Method getConvertMethod = pojoClass.getMethod(setConvertMethodName.toString(), new Class[] { String.class });
            fieldSetConvertMap.put(excel.exportName(), getConvertMethod);
          }
        }
      }
      // 将传入的File构造为FileInputStream;
      // // 得到工作表
View Full Code Here

Examples of org.jeecgframework.poi.excel.annotation.Excel

        excelEntity.setGetMethod(ExcelPublicUtil.getMethod(field.getName(),
            pojoClass));
        excelEntity.setList(list);
        excelParams.add(excelEntity);
      } else if (ExcelPublicUtil.isJavaClass(field)) {
        Excel excel = field.getAnnotation(Excel.class);
        excelEntity = new ExcelExportEntity();
        excelEntity.setType(excel.exportType());
        getExcelField(targetId, field, excelEntity, excel,
            pojoClass);
        if (getMethods != null) {
          List<Method> newMethods = new ArrayList<Method>();
          newMethods.addAll(getMethods);
View Full Code Here

Examples of org.jeecgframework.poi.excel.annotation.Excel

    ExcelExportEntity excelEntity;
    for (int i = 0; i < fields.length; i++) {
      Field field = fields[i];
      if(ExcelPublicUtil.isNotUserExcelUserThis(field, targetId)){continue;}
      if (ExcelPublicUtil.isJavaClass(field)) {
        Excel excel = field.getAnnotation(Excel.class);
        excelEntity = new ExcelExportEntity();
        getExcelField(targetId, field, excelEntity, excel,
            pojoClass);
        excelEntity.setType(excel.exportType());
        if (getMethods != null) {
          List<Method> newMethods = new ArrayList<Method>();
          newMethods.addAll(getMethods);
          newMethods.add(excelEntity.getGetMethod());
          excelEntity.setGetMethods(newMethods);
View Full Code Here

Examples of railo.runtime.poi.Excel

public class SpreadSheetNew {
 
  private static final String DEFAULT_NAME = "Sheet1";

  public static Object call(PageContext pc) {
    return new Excel(DEFAULT_NAME, Excel.FORMAT_HSSF, 0);
  }
View Full Code Here

Examples of railo.runtime.poi.Excel

  }

  public static Object call(PageContext pc, Object sheetNameOrXMLFormat) throws PageException {
    short format=toFormat(sheetNameOrXMLFormat);
    if(format==Excel.FORMAT_UNDEFINED)
      return new Excel(Caster.toString(sheetNameOrXMLFormat), Excel.FORMAT_HSSF, 0);
    return new Excel(DEFAULT_NAME, format, 0);
  }
View Full Code Here

Examples of railo.runtime.poi.Excel

    // format
    short format=toFormat(oXmlFormat);
    if(format==Excel.FORMAT_UNDEFINED)
      throw new FunctionException(pc, "SpreadSheetNew", 2, "xmlFormat", "invalid value ["+oXmlFormat+"], valid values are [true,false,XSSF,HSSF]");
   
    return new Excel(sheetName, format, 0);
  }
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.