Package bad.robot.excel.cell

Examples of bad.robot.excel.cell.Cell


        return new CellInRowMatcher(expected);
    }

    @Override
    protected boolean matchesSafely(Row row, Description mismatch) {
        Cell actual = adaptPoi(row.getCell(columnIndex));

        if (!expected.equals(actual)) {
            mismatch.appendText("cell at ").appendValue(coordinate).appendText(" contained ").appendValue(actual).appendText(" expected ").appendValue(expected);
            return false;
        }
View Full Code Here


        copyCellsTo(row, workbook);
    }

    private void copyCellsTo(org.apache.poi.ss.usermodel.Row row, Workbook workbook) {
        for (ColumnIndex index : cells.keySet()) {
            Cell cellToInsert = cells.get(index);
            cellToInsert.addTo(row, index, workbook);
        }
    }
View Full Code Here

    @Test
    public void exampleUsage() throws IOException {
        StyleBuilder blue = aStyle().with(fill(foregroundColour(Blue))).with(fontSize("18")).with(fontColour(White));
        StyleBuilder yellow = aStyle().with(fill(foregroundColour(Yellow))).with(fontColour(White));
        Cell a1 = new StringCell("Blue", blue);
        Cell a2 = new StringCell("Yellow", yellow);
        Workbook workbook = getWorkbook("emptySheet.xlsx");
        PoiWorkbook sheet = new PoiWorkbook(workbook);
        sheet.replaceCell(coordinate(A, 1), a1);
        sheet.replaceCell(coordinate(A, 2), a2);
        OutputWorkbook.writeWorkbookToTemporaryFile(workbook, "exampleOfApplyColours");
View Full Code Here

    private final Border border = border(top(None), right(None), bottom(ThinSolid), left(ThinSolid));
    private final DataFormat numberFormat = asTwoDecimalPlacesNumber();

    @Test
    public void exampleOfCreatingARow() throws Exception {
        Cell cell = new DoubleCell(9999.99d, aStyle().with(border).with(numberFormat));

        HashMap<ColumnIndex, Cell> columns = new HashMap<ColumnIndex, Cell>();
        columns.put(column(A), cell);

        Row row = new Row(columns);
View Full Code Here

TOP

Related Classes of bad.robot.excel.cell.Cell

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.