Package org.apache.poi.hssf.usermodel

Examples of org.apache.poi.hssf.usermodel.HSSFSheet.createRow()


    HSSFRow row;

    CellStyle cellStyle = new CellStyle(wb);

    currentRow = createEmptyRows(sheet, currentRow, 2);
    row = sheet.createRow((short) currentRow++);

    currentRow = createHeadings(reportSetting, sheet, currentRow, row,
        cellStyle);

    Collection<SalesmanGoal> dataList = (Collection<SalesmanGoal>) data
View Full Code Here


    Collection<SalesmanGoal> dataList = (Collection<SalesmanGoal>) data
        .get("Reportdata");
    String currentProductAreaName = "";
    for (SalesmanGoal goal : dataList) {
      row = sheet.createRow((short) currentRow++);
      String productAreaName = goal.getProductArea().getProductArea();
      if (!currentProductAreaName.equalsIgnoreCase(productAreaName)) {
        currentProductAreaName = productAreaName;
      } else {
        productAreaName = "";
View Full Code Here

    HSSFRow row;

    CellStyle cellStyle = new CellStyle(wb);

    // currentRow = createEmptyRows(sheet, currentRow, 2);
    row = sheet.createRow((short) currentRow++);

    createCell(row, cellStyle.getStyle((short) 12,
        HSSFFont.BOLDWEIGHT_BOLD, HSSFCellStyle.ALIGN_LEFT, (short) -1,
        null, null, null, null, null), (short) 0, "Takstoltegning uke "
        + reportSetting.getWeekFrom() + " - "
View Full Code Here

        + reportSetting.getWeekFrom() + " - "
        + reportSetting.getWeekTo() + " " + reportSetting.getYear());

    currentRow = createEmptyRows(sheet, currentRow, 2);

    row = sheet.createRow((short) currentRow++);

    createCell(row, cellStyle.getStyle((short) 10,
        HSSFFont.BOLDWEIGHT_BOLD, HSSFCellStyle.ALIGN_LEFT, (short) -1,
        null, null, null, null, null), (short) 1, "Takstol");
View Full Code Here

    createCell(row, cellStyle.getStyle((short) 10,
        HSSFFont.BOLDWEIGHT_BOLD, HSSFCellStyle.ALIGN_LEFT, (short) -1,
        null, null, null, null, null), (short) 5, "Byggelement");

    row = sheet.createRow((short) currentRow++);

    createCell(row, cellStyle.getStyle((short) 10,
        HSSFFont.BOLDWEIGHT_BOLD, HSSFCellStyle.ALIGN_LEFT, (short) -1,
        null, null, null, HSSFCellStyle.BORDER_THIN, null), (short) 0,
        "Tegner");
View Full Code Here

    Map<TakstoltegnerVSum, Collection<TakstoltegnerV>> dataList = (Map<TakstoltegnerVSum, Collection<TakstoltegnerV>>) data
        .get("Reportdata");
    currentRow = createSumLines(productAreaColumns, sheet, currentRow,
        cellStyle, dataList);
    currentRow = createBasisHeading(sheet, currentRow, cellStyle);
    row = sheet.createRow((short) currentRow++);
    int column = 0;
    for (Collection<TakstoltegnerV> tegnerListe : dataList.values()) {
      for (TakstoltegnerV tegner : tegnerListe) {
        column = 0;
        createCell(row, cellStyle.getStyle((short) 10,
View Full Code Here

        createCell(row, cellStyle.getStyle((short) 10,
            HSSFFont.BOLDWEIGHT_NORMAL, HSSFCellStyle.ALIGN_LEFT,
            (short) -1, null, null, null, null, null),
            (short) column++, tegner.getSalesman());

        row = sheet.createRow((short) currentRow++);

      }
    }

    openExcelFile(reportSetting.getExcelReportType().getExcelFileName()
View Full Code Here

      String[] columnPropterties, String[] columnNames, List<?> list)
  {
    HSSFWorkbook workbook = new HSSFWorkbook();
    HSSFSheet sheet = workbook.createSheet(sheetName);
    // 创建第1行,也就是输出表头
    HSSFRow row = sheet.createRow(0);
    HSSFCell cell;
    for (int i = 0; i < columnNames.length; i++)
    {
      cell = row.createCell(i);
      cell.setCellValue(new HSSFRichTextString(columnNames[i]));
View Full Code Here

      cell.setCellValue(new HSSFRichTextString(columnNames[i]));
    }
    // 下面是输出各行的数据
    for (int i = 0; i < list.size(); i++)
    {
      row = sheet.createRow(i + 1);
      Object o = list.get(i);
      for (int j = 0; j < columnPropterties.length; j++)
      {
        cell = row.createCell(j);
        Object obj = ReflectionUtils.invokeGetterMethod(o, columnPropterties[j]);
View Full Code Here

      OutputStream out) throws IOException
  {
    wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet(sheetName);
    // 创建第1行,也就是输出表头
    HSSFRow row = sheet.createRow(0);
    HSSFCell cell;
    for (int i = 0; i < columnNames.length; i++)
    {
      cell = row.createCell(i);
      cell.setCellValue(new HSSFRichTextString(columnNames[i]));
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.