Examples of ExcelDataContext


Examples of org.apache.metamodel.excel.ExcelDataContext

                ExcelConfiguration.DEFAULT_COLUMN_NAME_LINE);
        final boolean skipEmptyLines = getBoolean(params.getSkipEmptyLines(), true);
        final boolean skipEmptyColumns = getBoolean(params.getSkipEmptyColumns(), false);
        final ExcelConfiguration configuration = new ExcelConfiguration(columnNameLineNumber, skipEmptyLines,
                skipEmptyColumns);
        return new ExcelDataContext(resource, configuration);
    }
View Full Code Here

Examples of org.apache.metamodel.excel.ExcelDataContext

     * @param configuration
     *            the configuration with metadata for reading the spreadsheet
     * @return a DataContext object that matches the request
     */
    public static UpdateableDataContext createExcelDataContext(File file, ExcelConfiguration configuration) {
        return new ExcelDataContext(file, configuration);
    }
View Full Code Here

Examples of org.apache.metamodel.excel.ExcelDataContext

    @Test
    public void testReadDataContext() {
        assertEquals(ExcelDataContext.class, dataContext.getClass());

        ExcelDataContext excel = (ExcelDataContext) dataContext;
        Resource resource = excel.getResource();

        assertEquals(FileResource.class, resource.getClass());

        assertEquals("example.xlsx", resource.getName());

        assertEquals("[hello, world]", Arrays.toString(excel.getDefaultSchema().getTable(0).getColumnNames()));

        Assert.assertTrue(excel.getConfiguration().isSkipEmptyLines());
        Assert.assertTrue(excel.getConfiguration().isSkipEmptyColumns());
    }
View Full Code Here

Examples of org.apache.metamodel.excel.ExcelDataContext

     * @param configuration
     *            the configuration with metadata for reading the spreadsheet
     * @return a DataContext object that matches the request
     */
    public static UpdateableDataContext createExcelDataContext(File file, ExcelConfiguration configuration) {
        return new ExcelDataContext(file, configuration);
    }
View Full Code Here

Examples of org.apache.metamodel.excel.ExcelDataContext

     * @param configuration
     *            the configuration with metadata for reading the spreadsheet
     * @return a DataContext object that matches the request
     */
    public static UpdateableDataContext createExcelDataContext(File file, ExcelConfiguration configuration) {
        return new ExcelDataContext(file, configuration);
    }
View Full Code Here

Examples of org.eobjects.metamodel.excel.ExcelDataContext

    synchronized (dataContexts) {
      UpdateableDataContext dataContext = dataContexts.get(filename);
      if (dataContext == null) {

        File file = new File(filename);
        dataContext = new ExcelDataContext(file);

        Table table = getTable(dataContext, sheetName, columns);

        dataContexts.put(filename, dataContext);
        counters.put(filename, new AtomicInteger(1));
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.