Package no.ugland.utransprod.util.excel

Examples of no.ugland.utransprod.util.excel.ExcelUtil


  }

  public final void importAllPostalCodes(final String excelFileName,
      final boolean add) throws ProTransException {

    ExcelUtil excelUtil = new ExcelUtil();
    excelUtil.openExcelFileForRead(excelFileName);
    ExcelUtil.checkFileFormat(excelUtil, FILE_HEADER_IMPORT);
    if (!add) {
      deleteAllPostalCodes();
    }
    importOrUpdateTransportCosts(new TransportCostImport(), excelUtil);
View Full Code Here


  }

  public final void updatePricesFromFile(final String excelFileName)
      throws ProTransException {
    infoText = "Oppdaterer priser ...";
    ExcelUtil excelUtil = new ExcelUtil();
    excelUtil.openExcelFileForRead(excelFileName);
    ExcelUtil.checkFileFormat(excelUtil, FILE_HEADER_UPDATE);
    setAllPostalCodesInvalid();
    importOrUpdateTransportCosts(new TransportCostUpdate(), excelUtil);
    importTransportCostAdditions(excelUtil);
  }
View Full Code Here

  }

  public final void importAllAreas(final String excelFileName,
      final boolean add) throws ProTransException {

    ExcelUtil excelUtil = new ExcelUtil();
    excelUtil.openExcelFileForRead(excelFileName);
    ExcelUtil.checkFileFormat(excelUtil, FILE_HEADER_IMPORT_AREA);
    if (!add) {
      deleteAllAreas();
    }
    importAreas(excelUtil);
View Full Code Here

    areaManager.removeAll();
  }

  public final void importAllCounties(final String excelFileName,
      final boolean add) throws ProTransException {
    ExcelUtil excelUtil = new ExcelUtil();
    excelUtil.openExcelFileForRead(excelFileName);
    ExcelUtil.checkFileFormat(excelUtil, FILE_HEADER_IMPORT_COUNTY);
    if (!add) {
      deleteAllCounties();
    }
    importCounties(excelUtil);
View Full Code Here

    dao.removeAll();

  }

  public void importSnowLoad(String excelFileName) throws ProTransException {
    ExcelUtil excelUtil = new ExcelUtil();
    excelUtil.openExcelFileForRead(excelFileName);
    ExcelUtil.checkFileFormat(excelUtil, FILE_HEADER_IMPORT_SNOW_LOAD);

    importSnowload(excelUtil);

  }
View Full Code Here

  public void generateExcel(WindowInterface window,
      ExcelReportSetting excelReportSetting) throws ProTransException {

    if (checkParameters(excelReportSetting, window)) {
      if (continueGenerateExcel(excelReportSetting, window)) {
        ExcelUtil excelUtil = new ExcelUtil();
        excelUtil.generateExcel(excelReportSetting, window);
      }
    }
  }
View Full Code Here

    dialogFixture.button("ButtonShowExcel").click();

    JOptionPaneFinder.findOptionPane().withTimeout(140000).using(
        dialogFixture.robot);

    ExcelUtil excelUtil = new ExcelUtil();
  }
View Full Code Here

    URL url = getClass().getClassLoader().getResource("Budsjett_salesman_import_villa.xls");
        budgetManager.importBudget(url.getFile(),BudgetType.SALESMAN);
        Periode periode = new Periode(2010, 5, 5);
        Collection<SalesmanGoal> salesGoalList = salesVManager.getSalesGoalList(periode);
    ExcelUtil.setUseUniqueFileName(false);
    ExcelUtil excelUtil=new ExcelUtil();
   
    ExcelReportSetting reportSetting=new ExcelReportSetting(ExcelReportEnum.SALES_GOAL);
    reportSetting.setYear(2010);
    reportSetting.setWeekFrom(5);
    reportSetting.setWeekTo(5);
    Map<Object,Object> data=Maps.newHashMap();
    data.put("Reportdata", salesGoalList);
    excelUtil.generateSalesGoalReport(reportSetting, data);
   
    ExcelUtil excelUtilReader=new ExcelUtil();
    excelUtilReader.openExcelFileForRead("excel/Salgsm�l.xls");
   
    String cellValue=excelUtilReader.readCell(2, 0, null);
    assertEquals("SALGSM�L", cellValue);
    cellValue=excelUtilReader.readCell(3, 2, null);
    assertEquals("Salgsm�l 2010", cellValue);
    cellValue=excelUtilReader.readCell(3, 5, null);
    assertEquals("Uke 5", cellValue);
    cellValue=excelUtilReader.readCell(3, 13, null);
    assertEquals("Akkumulert pr uke 5", cellValue);
    cellValue=excelUtilReader.readCell(4, 5, null);
    assertEquals("pr uke", cellValue);
    cellValue=excelUtilReader.readCell(4, 10, null);
    assertEquals("Endring fra i fjor(diff):", cellValue);
    cellValue=excelUtilReader.readCell(4, 13, null);
    assertEquals("pr uke", cellValue);
    cellValue=excelUtilReader.readCell(4, 18, null);
    assertEquals("Endring fra i fjor(diff):", cellValue);
    cellValue=excelUtilReader.readCell(5, 0, null);
    assertEquals("Produktomr�de", cellValue);
    cellValue=excelUtilReader.readCell(5, 1, null);
    assertEquals("Selger", cellValue);
    cellValue=excelUtilReader.readCell(5, 2, null);
    assertEquals("Ordre", cellValue);
    cellValue=excelUtilReader.readCell(5, 3, null);
    assertEquals("Tilbudsmengde", cellValue);
    cellValue=excelUtilReader.readCell(5, 4, null);
    assertEquals("Tilslagsprosent", cellValue);
    cellValue=excelUtilReader.readCell(5, 5, null);
    assertEquals("Tilslagsprosent", cellValue);
    cellValue=excelUtilReader.readCell(5, 6, null);
    assertEquals("DG", cellValue);
    cellValue=excelUtilReader.readCell(5, 7, null);
    assertEquals("Tilbudsmengde", cellValue);
    cellValue=excelUtilReader.readCell(5, 8, null);
    assertEquals("Ordremengde", cellValue);
    cellValue=excelUtilReader.readCell(5, 9, null);
    assertEquals("Avrop", cellValue);
    cellValue=excelUtilReader.readCell(5, 10, null);
    assertEquals("Tilslagsprosent", cellValue);
    cellValue=excelUtilReader.readCell(5, 11, null);
    assertEquals("Tilbudsmengde", cellValue);
    cellValue=excelUtilReader.readCell(5, 12, null);
    assertEquals("Ordremengde", cellValue);
    cellValue=excelUtilReader.readCell(5, 13, null);
    assertEquals("Tilslagsprosent", cellValue);
    cellValue=excelUtilReader.readCell(5, 14, null);
    assertEquals("DG", cellValue);
    cellValue=excelUtilReader.readCell(5, 15, null);
    assertEquals("Tilbudsmengde", cellValue);
    cellValue=excelUtilReader.readCell(5, 16, null);
    assertEquals("Ordremengde", cellValue);
    cellValue=excelUtilReader.readCell(5, 17, null);
    assertEquals("Avrop", cellValue);
    cellValue=excelUtilReader.readCell(5, 18, null);
    assertEquals("Tilslagsprosent", cellValue);
    cellValue=excelUtilReader.readCell(5, 19, null);
    assertEquals("Tilbudsmengde", cellValue);
    cellValue=excelUtilReader.readCell(5, 20, null);
    assertEquals("Ordremengde", cellValue);
    cellValue=excelUtilReader.readCell(6, 0, null);
    assertEquals("Garasje villa", cellValue);
    cellValue=excelUtilReader.readCell(6, 1, null);
   
    boolean salesmanFound=false;
    for(int i=6;i<=30;i++){
      cellValue=excelUtilReader.readCell(i, 1, null);
      if(cellValue.equalsIgnoreCase("Aleksander Federici")){
        salesmanFound=true;
      }
    }
    assertTrue(salesmanFound);
View Full Code Here

    Map<TakstoltegnerVSum,Collection<TakstoltegnerV>> tegnere=takstoltegnerVManager.findByPeriode(periode);
   
    assertNotNull(tegnere);
   
    ExcelUtil.setUseUniqueFileName(false);
    ExcelUtil excelUtil=new ExcelUtil();
   
    ExcelReportSetting reportSetting=new ExcelReportSetting(ExcelReportEnum.TAKSTOLTEGNER);
    reportSetting.setYear(2010);
    reportSetting.setWeekFrom(4);
    reportSetting.setWeekTo(5);
   
    Map<Object,Object> data=Maps.newHashMap();
    data.put("Reportdata", tegnere);
   
    excelUtil.generateTakstoltegnerReport(reportSetting, data);
   
    ExcelUtil excelUtilReader=new ExcelUtil();
    excelUtilReader.openExcelFileForRead("excel/Takstoltegner.xls");
   
    String cellValue=excelUtilReader.readCell(0, 0, null);
    assertEquals("Takstoltegning uke 4 - 5 2010", cellValue);
   
    cellValue=excelUtilReader.readCell(3, 1, null);
    assertEquals("Takstol", cellValue);
   
    cellValue=excelUtilReader.readCell(3, 3, null);
    assertEquals("Garasje", cellValue);
   
    cellValue=excelUtilReader.readCell(3, 5, null);
    assertEquals("Byggelement", cellValue);
   
    cellValue=excelUtilReader.readCell(4, 0, null);
    assertEquals("Tegner", cellValue);
   
    cellValue=excelUtilReader.readCell(4, 1, null);
    assertEquals("Antall", cellValue);
   
    cellValue=excelUtilReader.readCell(4, 2, null);
    assertEquals("Sum", cellValue);
   
    cellValue=excelUtilReader.readCell(4, 3, null);
    assertEquals("Antall", cellValue);
   
    cellValue=excelUtilReader.readCell(4, 4, null);
    assertEquals("Sum", cellValue);
   
    cellValue=excelUtilReader.readCell(4, 5, null);
    assertEquals("Antall", cellValue);
   
    cellValue=excelUtilReader.readCell(4, 6, null);
    assertEquals("Sum", cellValue);
   
   
    boolean drawerFound=false;
    for(int i=5;i<=8;i++){
      cellValue=excelUtilReader.readCell(i, 0, null);
     
      if(cellValue!=null&&cellValue.equalsIgnoreCase("Tom Andersen")){
        drawerFound=true;
        cellValue=excelUtilReader.readCell(i, 1, null);
        assertEquals("1.0", cellValue);
       
        cellValue=excelUtilReader.readCell(i, 2, null);
        assertEquals("8344.0", cellValue);
      }
    }
    assertTrue(drawerFound);
   
    cellValue=excelUtilReader.readCell(10, 0, null);
    assertEquals("Grunnlag", cellValue);
   
    cellValue=excelUtilReader.readCell(11, 0, null);
    assertEquals("Tegner", cellValue);
   
   
   
   
View Full Code Here

      try {
        String fileName = "transport_"
            + Util.getCurrentDateAsDateTimeString() + ".xls";
        String excelDirectory = ApplicationParamUtil
            .findParamByName("excel_path");
        ExcelUtil excelUtil = new ExcelUtil();
        excelUtil.showDataInExcelTransport(excelDirectory, fileName,
            null, models);
      } catch (ProTransException e) {
        errorString = e.getMessage();
        e.printStackTrace();
      }
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.util.excel.ExcelUtil

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.