public final class ExcelDataContext extends QueryPostprocessDataContext implements UpdateableDataContext
DataContext implementation to use for Excel spreadsheets.
This DataContext supports both the "old" .xls format and the "new" .xlsx
format, and saves the user the trouble of figuring out which one to use,
simply by detecting it at runtime and delegating to the appropriate
implementation.INFORMATION_SCHEMA_NAME| Constructor and Description |
|---|
ExcelDataContext(File file)
Constructs an Excel DataContext based on a file, with default
configuration
|
ExcelDataContext(File file,
ExcelConfiguration configuration)
Constructs an Excel DataContext based on a resource and a custom
configuration.
|
ExcelDataContext(Resource resource,
ExcelConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
executeUpdate(UpdateScript update) |
ExcelConfiguration |
getConfiguration()
Gets the Excel configuration used.
|
File |
getFile()
Deprecated.
|
protected Schema |
getMainSchema() |
protected String |
getMainSchemaName() |
Resource |
getResource()
Gets the Excel resource being read
|
protected Class<? extends org.apache.metamodel.excel.SpreadsheetReaderDelegate> |
getSpreadsheetReaderDelegateClass()
Convenient method for testing and inspecting internal state.
|
DataSet |
materializeMainSchemaTable(Table table,
Column[] columns,
int maxRows) |
protected void |
notifyTablesModified() |
protected void |
onSchemaCacheRefreshed() |
addConverter, executeCountQuery, executePrimaryKeyLookupQuery, executeQuery, getDefaultSchemaName, getMainSchemaInternal, getSchemaByNameInternal, getSchemaNamesInternal, isMainSchemaTable, isScalarFunctionMaterialized, materializeFromItem, materializeMainSchemaTable, materializeMainSchemaTable, materializeMainSchemaTable, materializeTable, materializeTablecompileQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, isQualifiedPathDelim, parseQuery, query, refreshSchemasclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompileQuery, executeQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, parseQuery, query, refreshSchemaspublic ExcelDataContext(File file)
file - public ExcelDataContext(File file, ExcelConfiguration configuration)
file - configuration - public ExcelDataContext(Resource resource, ExcelConfiguration configuration)
public ExcelConfiguration getConfiguration()
@Deprecated public File getFile()
public Resource getResource()
protected String getMainSchemaName() throws MetaModelException
getMainSchemaName in class QueryPostprocessDataContextMetaModelExceptionpublic DataSet materializeMainSchemaTable(Table table, Column[] columns, int maxRows)
materializeMainSchemaTable in class QueryPostprocessDataContextprotected Schema getMainSchema() throws MetaModelException
getMainSchema in class QueryPostprocessDataContextMetaModelExceptionprotected void onSchemaCacheRefreshed()
onSchemaCacheRefreshed in class AbstractDataContextprotected Class<? extends org.apache.metamodel.excel.SpreadsheetReaderDelegate> getSpreadsheetReaderDelegateClass()
protected void notifyTablesModified()
public void executeUpdate(UpdateScript update)
executeUpdate in interface UpdateableDataContextCopyright © 2007–2016 The Apache Software Foundation. All rights reserved.