Search in sources :

Example 61 with HSSFRow

use of org.apache.poi.hssf.usermodel.HSSFRow in project head by mifos.

the class XlsSavingsAccountImporter method parse.

public ParsedSavingsDto parse(InputStream is) {
    ParsedSavingsDto result = null;
    List<String> errors = new ArrayList<String>();
    // temporary list for new accounts numbers, currently
    List<String> newAccountsNumbers = new ArrayList<String>();
    // not used
    List<ImportedSavingDetail> parsedSavingDetails = new ArrayList<ImportedSavingDetail>();
    try {
        HSSFWorkbook workbook = new HSSFWorkbook(is);
        HSSFSheet sheet = workbook.getSheetAt(0);
        HSSFRow row = sheet.getRow(XlsSavingsImportTemplateConstants.FIRST_ROW_WITH_DATA.getValue());
        if (row == null) {
            throw new XlsParsingException(getMessage(XlsMessageConstants.NOT_ENOUGH_INPUT_ROW, null));
        }
        Iterator<Row> iterator = sheet.rowIterator();
        while (iterator.hasNext() && (iterator.next().getRowNum() < XlsSavingsImportTemplateConstants.FIRST_ROW_WITH_DATA.getValue() - 1)) ;
        while (iterator.hasNext()) {
            row = (HSSFRow) iterator.next();
            List<Object> params = new ArrayList<Object>();
            XlsSavingsImportTemplateConstants currentCell = XlsSavingsImportTemplateConstants.ACCOUNT_NUMBER;
            try {
                String accountNumber = getCellStringValue(row, currentCell);
                if (StringUtils.isBlank(accountNumber)) {
                    accountNumber = null;
                } else if (!StringUtils.isBlank(accountNumber)) {
                    // ...but it's duplicate
                    if (!validateAccountNumber(accountNumber, newAccountsNumbers)) {
                        params.clear();
                        params.add(accountNumber);
                        throw new XlsParsingException(getCellError(XlsMessageConstants.DUPLICATE_GLOBAL_NUM_ERROR, row, currentCell.getValue(), params));
                    }
                }
                currentCell = XlsSavingsImportTemplateConstants.CUSTOMER_GLOBAL_ID;
                String customerGlobalId = getCellStringValue(row, currentCell);
                if (customerGlobalId.isEmpty()) {
                    params.clear();
                    params.add(customerGlobalId);
                    throw new XlsParsingException(getCellError(XlsMessageConstants.CUSTOMER_NOT_BLANK, row, currentCell.getValue(), params));
                }
                CustomerBO customerBO = null;
                customerBO = validateCustomerGlobalId(customerGlobalId);
                if (customerBO == null) {
                    params.clear();
                    params.add(customerGlobalId);
                    throw new XlsParsingException(getCellError(XlsMessageConstants.CUSTOMER_NOT_FOUND, row, currentCell.getValue(), params));
                }
                currentCell = XlsSavingsImportTemplateConstants.PRODUCT_NAME;
                String productName = getCellStringValue(row, currentCell);
                PrdOfferingDto prdOfferingDto = null;
                prdOfferingDto = validateProductName(productName, customerBO, row, currentCell.getValue());
                currentCell = XlsSavingsImportTemplateConstants.STATUS_NAME;
                String statusName = getCellStringValue(row, currentCell);
                XlsLoanSavingsAccountStatesConstants statusConstant = null;
                statusConstant = validateStatusName(statusName, customerBO, row, currentCell.getValue());
                currentCell = XlsSavingsImportTemplateConstants.CANCEL_FlAG_REASON;
                String cancelReason = getCellStringValue(row, currentCell);
                XlsLoanSavingsFlagsConstants flagConstant = null;
                flagConstant = validateStatusFlagReason(cancelReason, statusName, AccountTypes.SAVINGS_ACCOUNT, row, currentCell.getValue());
                currentCell = XlsSavingsImportTemplateConstants.SAVINGS_AMOUNT;
                BigDecimal savingAmount = getCellDecimalValue(row, currentCell);
                if (savingAmount == BigDecimal.valueOf(0) || null == savingAmount) {
                    savingAmount = savingsProductDao.findBySystemId(prdOfferingDto.getGlobalPrdOfferingNum()).getRecommendedAmount().getAmount();
                }
                currentCell = XlsSavingsImportTemplateConstants.SAVINGS_BALANCE;
                BigDecimal savingBalance = getCellDecimalValue(row, currentCell);
                if (savingBalance == null) {
                    savingBalance = BigDecimal.valueOf(0);
                }
                if (accountNumber != null) {
                    newAccountsNumbers.add(accountNumber);
                }
                LocalDate date = new LocalDate();
                Short flagValue = flagConstant == null ? null : flagConstant.getFlag().getValue();
                ImportedSavingDetail detail = new ImportedSavingDetail(accountNumber, customerGlobalId, prdOfferingDto.getGlobalPrdOfferingNum(), statusConstant.getState().getValue(), flagValue, savingAmount, savingBalance, date);
                parsedSavingDetails.add(detail);
            } catch (XlsParsingException xex) {
                if (xex.isMultiple()) {
                    for (String msg : xex.getMessages()) {
                        errors.add(msg);
                    }
                } else {
                    errors.add(xex.getMessage());
                }
            } catch (Exception cex) {
                errors.add(cex.getMessage());
            }
        }
    } catch (Exception ex) {
        errors.add(ex.getMessage());
    }
    result = new ParsedSavingsDto(errors, parsedSavingDetails);
    return result;
}
Also used : ParsedSavingsDto(org.mifos.dto.domain.ParsedSavingsDto) ArrayList(java.util.ArrayList) HSSFRow(org.apache.poi.hssf.usermodel.HSSFRow) XlsParsingException(org.mifos.application.importexport.xls.XlsLoansAccountImporter.XlsParsingException) HSSFRichTextString(org.apache.poi.hssf.usermodel.HSSFRichTextString) LocalDate(org.joda.time.LocalDate) HSSFWorkbook(org.apache.poi.hssf.usermodel.HSSFWorkbook) BigDecimal(java.math.BigDecimal) XlsParsingException(org.mifos.application.importexport.xls.XlsLoansAccountImporter.XlsParsingException) ImportedSavingDetail(org.mifos.dto.domain.ImportedSavingDetail) CustomerBO(org.mifos.customers.business.CustomerBO) PrdOfferingDto(org.mifos.dto.domain.PrdOfferingDto) HSSFSheet(org.apache.poi.hssf.usermodel.HSSFSheet) HSSFRow(org.apache.poi.hssf.usermodel.HSSFRow) Row(org.apache.poi.ss.usermodel.Row)

Example 62 with HSSFRow

use of org.apache.poi.hssf.usermodel.HSSFRow in project adempiere by adempiere.

the class SmjXlsReport method reportTable.

// titleTable
/**
	 * llena los datos del reporte - fill report data
	 * @param book
	 * @param data
	 * @param sheet
	 * @param fila
	 */
public void reportTable(HSSFWorkbook book, LinkedList<ReportTO> data, HSSFSheet sheet, int fila) {
    HSSFRow row;
    // crea fuente - create font
    HSSFFont font = book.createFont();
    font.setFontHeightInPoints((short) 10);
    font.setFontName(HSSFFont.FONT_ARIAL);
    HSSFRichTextString text;
    Iterator<ReportTO> itRep = data.iterator();
    Boolean newRow = false;
    sheet.setColumnWidth((short) 0, (short) (13 * 256));
    sheet.setColumnWidth((short) 1, (short) (60 * 256));
    for (int i = 2; i < (cols); i++) {
        sheet.setColumnWidth((short) i, (short) (15 * 256));
    }
    //for
    // estio celda - cell style
    HSSFCellStyle cellStyle = book.createCellStyle();
    HSSFCellStyle cellStyleD = book.createCellStyle();
    HSSFCellStyle cellStyleN = book.createCellStyle();
    while (itRep.hasNext()) {
        short col = 0;
        ReportTO rpt = itRep.next();
        if (!newRow) {
            cellStyle = book.createCellStyle();
            cellStyleD = book.createCellStyle();
            cellStyleN = book.createCellStyle();
        }
        //if
        newRow = false;
        if (rpt.getReportlinestyle() != null && rpt.getReportlinestyle().equals("T")) {
            // Coloca titulo - put title
            row = sheet.createRow(fila++);
            HSSFFont fontT = book.createFont();
            fontT.setFontHeightInPoints((short) 12);
            fontT.setFontName(HSSFFont.FONT_ARIAL);
            fontT.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
            HSSFCellStyle cellStyleT = book.createCellStyle();
            cellStyleT.setWrapText(true);
            cellStyleT.setAlignment(HSSFCellStyle.ALIGN_CENTER);
            cellStyleT.setVerticalAlignment(HSSFCellStyle.VERTICAL_TOP);
            cellStyleT.setFont(fontT);
            Region region = new Region(fila - 1, (short) 0, fila - 1, endRegion);
            sheet.addMergedRegion(region);
            text = new HSSFRichTextString(rpt.getDescription());
            HSSFCell cellT = row.createCell(col);
            cellT.setCellStyle(cellStyleT);
            cellT.setCellValue(text);
            newRow = true;
        } else if (rpt.getReportlinestyle() != null && rpt.getReportlinestyle().equals("L")) {
            // coloca linea en el reporte - Put under line in the report
            cellStyle.setWrapText(true);
            cellStyle.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
            cellStyle.setBottomBorderColor((short) 8);
            cellStyleD.setWrapText(true);
            cellStyleD.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
            cellStyleD.setBottomBorderColor((short) 8);
            cellStyleN.setWrapText(true);
            cellStyleN.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
            cellStyleN.setBottomBorderColor((short) 8);
            newRow = true;
        } else if (rpt.getReportlinestyle() != null && rpt.getReportlinestyle().equals("X")) {
            // coloca linea de total - Put total line
            cellStyle.setWrapText(true);
            cellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_TOP);
            cellStyle.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
            cellStyle.setBottomBorderColor((short) 8);
            newRow = true;
        } else if (rpt.getReportlinestyle() != null && rpt.getReportlinestyle().equals("Z")) {
            // coloca linea doble de total - Put total line doble
            cellStyle.setWrapText(true);
            cellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_TOP);
            cellStyle.setBorderTop(HSSFCellStyle.BORDER_DOUBLE);
            cellStyle.setBottomBorderColor((short) 8);
            //--------------
            row = sheet.createRow(fila++);
            ReportTO rptD = new ReportTO();
            putRow(cellStyle, cellStyleD, cellStyleN, sheet, row, fila, rptD);
            cellStyle = book.createCellStyle();
            newRow = true;
        } else if (rpt.getReportlinestyle() != null && rpt.getReportlinestyle().equals("D")) {
            // coloca liena de descripcion - put description line
            cellStyleD.setWrapText(true);
            cellStyleD.setVerticalAlignment(HSSFCellStyle.VERTICAL_TOP);
            cellStyleD.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
            cellStyleD.setBottomBorderColor((short) 8);
            newRow = true;
        } else if (rpt.getReportlinestyle() != null && rpt.getReportlinestyle().equals("S")) {
            // coloca linea en blanco - put empty line
            row = sheet.createRow(fila++);
            newRow = true;
        } else if (rpt.getTablevel() != null && rpt.getTablevel() > 0) {
            // coloca espacios a la izquierda para simular jeraquia - put
            // left spaces to simulate hierarchy
            row = sheet.createRow(fila++);
            String jerarchy = "";
            for (int i = 1; i <= rpt.getTablevel(); i++) {
                jerarchy = jerarchy + "   ";
            }
            //for
            Region region = new Region(fila - 1, (short) 0, fila - 1, endRegion);
            sheet.addMergedRegion(region);
            text = new HSSFRichTextString(jerarchy + rpt.getDescription());
            HSSFCell cellJ = row.createCell(col);
            cellJ.setCellValue(text);
            newRow = true;
        } else {
            row = sheet.createRow(fila++);
            putRow(cellStyle, cellStyleD, cellStyleN, sheet, row, fila, rpt);
        }
    //else
    }
// while itData
}
Also used : HSSFCellStyle(org.apache.poi.hssf.usermodel.HSSFCellStyle) HSSFRichTextString(org.apache.poi.hssf.usermodel.HSSFRichTextString) HSSFCell(org.apache.poi.hssf.usermodel.HSSFCell) HSSFRow(org.apache.poi.hssf.usermodel.HSSFRow) ReportTO(org.compiere.model.ReportTO) Region(org.apache.poi.hssf.util.Region) HSSFFont(org.apache.poi.hssf.usermodel.HSSFFont) HSSFRichTextString(org.apache.poi.hssf.usermodel.HSSFRichTextString)

Example 63 with HSSFRow

use of org.apache.poi.hssf.usermodel.HSSFRow in project adempiere by adempiere.

the class SmjXlsReport method generate.

public HSSFWorkbook generate(LinkedList<ReportTO> data, String[] generalTitle, String clientName, String clientNIT, String periodName, String currencyName, MReportColumn[] m_columns, String city, Integer logoId) {
    int fila = 0;
    HSSFRow row;
    cols = m_columns.length + 2;
    endRegion = (short) (cols - 1);
    try {
        // create workbook
        HSSFWorkbook book = new HSSFWorkbook();
        // crea hoja - create sheet
        // Goodwill BF: Invalid sheet name
        HSSFSheet sheet = book.createSheet(StringUtils.makePrefix(generalTitle[0]));
        // crea fuente - Create Font
        HSSFFont font = book.createFont();
        font.setFontHeightInPoints((short) 13);
        font.setFontName(HSSFFont.FONT_ARIAL);
        font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
        // estio celda - cell style
        HSSFCellStyle cellStyle = book.createCellStyle();
        cellStyle.setWrapText(true);
        cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
        cellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_TOP);
        cellStyle.setFont(font);
        // add logo
        if (logoId > 0) {
            MImage mimage = MImage.get(Env.getCtx(), logoId);
            byte[] imageData = mimage.getData();
            HSSFPatriarch patriarch = sheet.createDrawingPatriarch();
            HSSFClientAnchor anchor;
            anchor = new HSSFClientAnchor(100, 50, 200, 255, (short) 0, 0, (short) 1, 1);
            anchor.setAnchorType(2);
            int pictureIndex = book.addPicture(imageData, HSSFWorkbook.PICTURE_TYPE_PNG);
            patriarch.createPicture(anchor, pictureIndex);
            for (int i = 0; i < 5; i++) row = sheet.createRow(fila++);
        }
        //if Logo report
        // Titulo General - general Title
        row = sheet.createRow(fila++);
        HSSFRichTextString text = new HSSFRichTextString(generalTitle[0]);
        HSSFCell cell = row.createCell((short) 0);
        cell.setCellStyle(cellStyle);
        cell.setCellType(HSSFCell.CELL_TYPE_STRING);
        cell.setCellValue(text);
        Region region = new Region(fila - 1, (short) 0, fila - 1, endRegion);
        sheet.addMergedRegion(region);
        // empresa - Company
        row = sheet.createRow(fila++);
        text = new HSSFRichTextString(clientName);
        cell = row.createCell((short) 0);
        cell.setCellStyle(cellStyle);
        cell.setCellType(HSSFCell.CELL_TYPE_STRING);
        cell.setCellValue(text);
        region = new Region(fila - 1, (short) 0, fila - 1, endRegion);
        sheet.addMergedRegion(region);
        // Ciudad - City
        row = sheet.createRow(fila++);
        text = new HSSFRichTextString(city);
        cell = row.createCell((short) 0);
        cell.setCellStyle(cellStyle);
        cell.setCellType(HSSFCell.CELL_TYPE_STRING);
        cell.setCellValue(text);
        region = new Region(fila - 1, (short) 0, fila - 1, endRegion);
        sheet.addMergedRegion(region);
        // NIT
        row = sheet.createRow(fila++);
        text = new HSSFRichTextString(clientNIT);
        cell = row.createCell((short) 0);
        cell.setCellStyle(cellStyle);
        cell.setCellType(HSSFCell.CELL_TYPE_STRING);
        cell.setCellValue(text);
        region = new Region(fila - 1, (short) 0, fila - 1, endRegion);
        sheet.addMergedRegion(region);
        // periodo - Period
        String pn = "";
        if (generalTitle[1] != null && generalTitle[1].length() > 0) {
            pn = generalTitle[1] + " " + periodName;
        } else {
            pn = periodName;
        }
        if (generalTitle[2] != null && generalTitle[2].length() > 0) {
            pn = pn + " " + generalTitle[2];
        }
        row = sheet.createRow(fila++);
        text = new HSSFRichTextString(pn);
        cell = row.createCell((short) 0);
        cell.setCellStyle(cellStyle);
        cell.setCellType(HSSFCell.CELL_TYPE_STRING);
        cell.setCellValue(text);
        region = new Region(fila - 1, (short) 0, fila - 1, endRegion);
        sheet.addMergedRegion(region);
        // tipo moneda - currency
        row = sheet.createRow(fila++);
        text = new HSSFRichTextString(currencyName);
        cell = row.createCell((short) 0);
        cell.setCellStyle(cellStyle);
        cell.setCellType(HSSFCell.CELL_TYPE_STRING);
        cell.setCellValue(text);
        region = new Region(fila - 1, (short) 0, fila - 1, endRegion);
        sheet.addMergedRegion(region);
        row = sheet.createRow(fila++);
        titleTable(book, sheet, fila++, m_columns);
        // llena datos del reporte - fill data report
        reportTable(book, data, sheet, fila);
        return book;
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }
//try/catch
}
Also used : HSSFPatriarch(org.apache.poi.hssf.usermodel.HSSFPatriarch) HSSFRichTextString(org.apache.poi.hssf.usermodel.HSSFRichTextString) HSSFClientAnchor(org.apache.poi.hssf.usermodel.HSSFClientAnchor) HSSFRow(org.apache.poi.hssf.usermodel.HSSFRow) HSSFRichTextString(org.apache.poi.hssf.usermodel.HSSFRichTextString) HSSFWorkbook(org.apache.poi.hssf.usermodel.HSSFWorkbook) IOException(java.io.IOException) FileNotFoundException(java.io.FileNotFoundException) HSSFCellStyle(org.apache.poi.hssf.usermodel.HSSFCellStyle) MImage(org.compiere.model.MImage) HSSFCell(org.apache.poi.hssf.usermodel.HSSFCell) Region(org.apache.poi.hssf.util.Region) HSSFSheet(org.apache.poi.hssf.usermodel.HSSFSheet) HSSFFont(org.apache.poi.hssf.usermodel.HSSFFont)

Example 64 with HSSFRow

use of org.apache.poi.hssf.usermodel.HSSFRow in project adempiere by adempiere.

the class SmjXlsReport method titleTable.

// generate
/**
	 * Crea la fila de titulos - create title row
	 * @param wb
	 * @param hs
	 * @param fila
	 * @param colsName
	 */
private void titleTable(HSSFWorkbook book, HSSFSheet sheet, int fila, MReportColumn[] m_columns) {
    short col = 0;
    // crea fuente - create font
    HSSFFont font = book.createFont();
    font.setFontHeightInPoints((short) 13);
    font.setFontName(HSSFFont.FONT_ARIAL);
    font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
    //		font.setColor(HSSFColor.BLUE.index);
    // estio celda - cell style
    HSSFCellStyle cellStyle = book.createCellStyle();
    cellStyle.setWrapText(true);
    cellStyle.setAlignment(HSSFCellStyle.ALIGN_JUSTIFY);
    cellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_TOP);
    //		cellStyle.setFillPattern(HSSFCellStyle.SPARSE_DOTS);
    //		cellStyle.setFillBackgroundColor(HSSFColor.GREY_40_PERCENT.index);
    cellStyle.setFont(font);
    // //Titulos de la tabla - Table titles
    HSSFRow row = sheet.createRow(fila);
    // Nombre - name
    HSSFRichTextString text = new HSSFRichTextString(Msg.translate(Env.getCtx(), "name").toUpperCase());
    HSSFCell cell = row.createCell(col++);
    cell.setCellStyle(cellStyle);
    cell.setCellType(HSSFCell.CELL_TYPE_STRING);
    cell.setCellValue(text);
    // Desripcion - description
    text = new HSSFRichTextString(Msg.translate(Env.getCtx(), "description").toUpperCase());
    cell = row.createCell(col++);
    cell.setCellStyle(cellStyle);
    cell.setCellType(HSSFCell.CELL_TYPE_STRING);
    cell.setCellValue(text);
    // columnas de valores - Value Columns
    for (MReportColumn mcol : m_columns) {
        String colName = mcol.getName();
        text = new HSSFRichTextString(colName.toUpperCase());
        cell = row.createCell(col++);
        cell.setCellStyle(cellStyle);
        cell.setCellType(HSSFCell.CELL_TYPE_STRING);
        cell.setCellValue(text);
    }
//for columnas
}
Also used : HSSFCellStyle(org.apache.poi.hssf.usermodel.HSSFCellStyle) HSSFRichTextString(org.apache.poi.hssf.usermodel.HSSFRichTextString) MReportColumn(org.compiere.report.MReportColumn) HSSFCell(org.apache.poi.hssf.usermodel.HSSFCell) HSSFRow(org.apache.poi.hssf.usermodel.HSSFRow) HSSFFont(org.apache.poi.hssf.usermodel.HSSFFont) HSSFRichTextString(org.apache.poi.hssf.usermodel.HSSFRichTextString)

Example 65 with HSSFRow

use of org.apache.poi.hssf.usermodel.HSSFRow in project adempiere by adempiere.

the class AbstractExcelExporter method export.

/**
	 * Export to given stream
	 * @param out
	 * @throws Exception
	 */
private void export(OutputStream out) throws Exception {
    HSSFSheet sheet = createTableSheet();
    String sheetName = null;
    //
    int colnumMax = 0;
    for (int rownum = 0, xls_rownum = 1; rownum < getRowCount(); rownum++, xls_rownum++) {
        setCurrentRow(rownum);
        boolean isPageBreak = false;
        HSSFRow row = sheet.createRow(xls_rownum);
        //	for all columns
        int colnum = 0;
        for (int col = 0; col < getColumnCount(); col++) {
            if (colnum > colnumMax)
                colnumMax = colnum;
            //
            if (isColumnPrinted(col)) {
                HSSFCell cell = row.createCell(colnum);
                // line row
                Object obj = getValueAt(rownum, col);
                int displayType = getDisplayType(rownum, col);
                if (obj == null)
                    ;
                else if (DisplayType.isDate(displayType)) {
                    Timestamp value = (Timestamp) obj;
                    cell.setCellValue(value);
                } else if (DisplayType.isNumeric(displayType)) {
                    double value = 0;
                    if (obj instanceof Number) {
                        value = ((Number) obj).doubleValue();
                    }
                    cell.setCellValue(value);
                } else if (DisplayType.YesNo == displayType) {
                    boolean value = false;
                    if (obj instanceof Boolean)
                        value = (Boolean) obj;
                    else
                        value = "Y".equals(obj);
                    cell.setCellValue(new HSSFRichTextString(Msg.getMsg(getLanguage(), value == true ? "Y" : "N")));
                } else {
                    //	formatted
                    String value = fixString(obj.toString());
                    cell.setCellValue(new HSSFRichTextString(value));
                }
                //
                HSSFCellStyle style = getStyle(rownum, col);
                cell.setCellStyle(style);
                // Page break
                if (isPageBreak(rownum, col)) {
                    isPageBreak = true;
                    sheetName = fixString(cell.getRichStringCellValue().getString());
                }
                //
                colnum++;
            }
        //	printed
        }
        // Page Break
        if (isPageBreak) {
            closeTableSheet(sheet, sheetName, colnumMax);
            sheet = createTableSheet();
            xls_rownum = 0;
            isPageBreak = false;
        }
    }
    //	for all rows
    closeTableSheet(sheet, sheetName, colnumMax);
    //
    m_workbook.write(out);
    out.close();
    // Workbook Info
    if (CLogMgt.isLevelFine()) {
        log.fine("Sheets #" + m_sheetCount);
        log.fine("Styles used #" + m_styles.size());
    }
}
Also used : HSSFRichTextString(org.apache.poi.hssf.usermodel.HSSFRichTextString) HSSFRow(org.apache.poi.hssf.usermodel.HSSFRow) HSSFRichTextString(org.apache.poi.hssf.usermodel.HSSFRichTextString) Timestamp(java.sql.Timestamp) HSSFCellStyle(org.apache.poi.hssf.usermodel.HSSFCellStyle) HSSFCell(org.apache.poi.hssf.usermodel.HSSFCell) HSSFSheet(org.apache.poi.hssf.usermodel.HSSFSheet)

Aggregations

HSSFRow (org.apache.poi.hssf.usermodel.HSSFRow)124 HSSFCell (org.apache.poi.hssf.usermodel.HSSFCell)98 HSSFSheet (org.apache.poi.hssf.usermodel.HSSFSheet)82 HSSFWorkbook (org.apache.poi.hssf.usermodel.HSSFWorkbook)71 HSSFCellStyle (org.apache.poi.hssf.usermodel.HSSFCellStyle)29 FileOutputStream (java.io.FileOutputStream)24 HSSFRichTextString (org.apache.poi.hssf.usermodel.HSSFRichTextString)24 Test (org.junit.Test)18 IOException (java.io.IOException)16 HSSFFormulaEvaluator (org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator)15 HSSFFont (org.apache.poi.hssf.usermodel.HSSFFont)14 File (java.io.File)13 ArrayList (java.util.ArrayList)12 CellValue (org.apache.poi.ss.usermodel.CellValue)10 OutputStream (java.io.OutputStream)8 HashMap (java.util.HashMap)8 Map (java.util.Map)7 AssertionFailedError (junit.framework.AssertionFailedError)7 FileInputStream (java.io.FileInputStream)6 CellRangeAddress (org.apache.poi.ss.util.CellRangeAddress)6