Package org.apache.poi.ss.usermodel

Examples of org.apache.poi.ss.usermodel.Sheet


     * @throws Exception if occur
     */
    @Test(expected = ExcelRuleExtractor.FormatException.class)
    public void extractNullityCondition_empty() throws Exception {
        ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor();
        Sheet sheet = sheet("nullity.xls");
        extractor.extractNullityCondition(sheet.getRow(9));
    }
View Full Code Here


     * @throws Exception if occur
     */
    @Test(expected = ExcelRuleExtractor.FormatException.class)
    public void extractNullityCondition_blank() throws Exception {
        ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor();
        Sheet sheet = sheet("nullity.xls");
        extractor.extractNullityCondition(sheet.getRow(10));
    }
View Full Code Here

     * @throws Exception if occur
     */
    @Test(expected = ExcelRuleExtractor.FormatException.class)
    public void extractNullityCondition_invalid() throws Exception {
        ExcelRuleExtractor extractor = new DefaultExcelRuleExtractor();
        Sheet sheet = sheet("nullity.xls");
        extractor.extractNullityCondition(sheet.getRow(11));
    }
View Full Code Here

            throw new IllegalArgumentException("name must not be null"); //$NON-NLS-1$
        }
        if (model == null) {
            throw new IllegalArgumentException("model must not be null"); //$NON-NLS-1$
        }
        Sheet sheet = info.workbook.createSheet(name);
        Row titleRow = sheet.createRow(0);
        Row valueRow = sheet.createRow(1);
        int index = 0;
        for (PropertyDeclaration property : model.getDeclaredProperties()) {
            if (index >= info.version.getMaxColumns()) {
                LOG.warn(MessageFormat.format(
                        "データシートに追加できるプロパティ数は{0}までです: {1}",
View Full Code Here

        Workbook workbook = WorkbookGenerator.createEmptyWorkbook(version);
        ModelDeclaration model = load("simple.dmdl", "simple");
        SheetBuilder builder = new SheetBuilder(workbook, version, model);
        builder.addData("MODEL");

        Sheet sheet = workbook.getSheet("MODEL");
        assertThat(sheet, not(nullValue()));
        assertThat(cell(sheet, 0, 0), is("value"));
    }
View Full Code Here

        ModelDeclaration model = load("simple.dmdl", "simple");
        SheetBuilder builder = new SheetBuilder(workbook, version, model);
        builder.addData("MODEL");
        builder.addData("COPY");

        Sheet sheet = workbook.getSheet("COPY");
        assertThat(sheet, not(nullValue()));
        assertThat(cell(sheet, 0, 0), is("value"));
    }
View Full Code Here

        Workbook workbook = WorkbookGenerator.createEmptyWorkbook(version);
        ModelDeclaration model = load("basic_type.dmdl", "simple");
        SheetBuilder builder = new SheetBuilder(workbook, version, model);
        builder.addData("PRIMITIVES");

        Sheet sheet = workbook.getSheet("PRIMITIVES");
        assertThat(sheet, not(nullValue()));
        checkDataSheet(sheet, model);
    }
View Full Code Here

        Workbook workbook = WorkbookGenerator.createEmptyWorkbook(version);
        ModelDeclaration model = load("basic_type.dmdl", "simple");
        SheetBuilder builder = new SheetBuilder(workbook, version, model);
        builder.addRule("RULE");

        Sheet sheet = workbook.getSheet("RULE");
        checkRuleSheet(sheet, model);
    }
View Full Code Here

        ModelDeclaration model = load("simple.dmdl", "simple");
        SheetBuilder builder = new SheetBuilder(workbook, version, model);
        builder.addRule("MODEL");
        builder.addRule("COPY");

        Sheet sheet = workbook.getSheet("COPY");
        assertThat(sheet, not(nullValue()));
        for (RuleSheetFormat format : RuleSheetFormat.values()) {
            assertThat(format.name(), cell(sheet, format, 0, 0), is(format.getTitle()));
        }
    }
View Full Code Here

            throw new IllegalArgumentException("name must not be null"); //$NON-NLS-1$
        }
        if (model == null) {
            throw new IllegalArgumentException("model must not be null"); //$NON-NLS-1$
        }
        Sheet sheet = info.workbook.createSheet(name);
        fillRuleTitles(sheet);
        fillRuleFormat(sheet);
        fillRuleTotalCondition(sheet);
        fillRulePropertyConditions(sheet, model);
        adjustRuleWidth(sheet);
View Full Code Here

TOP

Related Classes of org.apache.poi.ss.usermodel.Sheet

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.