ExcelExtractor implements BatchableExtractor, Extractor, FileExtractor, InfersSchema, MetadataColumnsExtractor, CorruptedRecordsRouter, SplittableExtractor
FinalYes
Interfaces
- BatchableExtractor
- Extractor
- FileExtractor
- InfersSchema
- MetadataColumnsExtractor
- CorruptedRecordsRouter
- SplittableExtractor
Methods
- __construct() : mixed
- __destruct() : mixed
- An inference no extract() followed still holds its sample's open readers, and OpenSpout's file-based shared-strings cache leaves its temp folder behind until a reader closes.
- batchSize() : int<1, max>
- corruptedRecordsLoader() : Loader|null
- extract() : Generator<Signal|null, void>
- inferSchema() : static
- isRepeatable() : bool
- partitionSchema() : Schema
- partitionTypes() : static
- prunes() : bool
- reader() : FileSplitReader
- refresh() : void
- schema() : Schema
- source() : Path
- splits() : array<int, FileSplit>
- One split per admitted file: a workbook is a zip whose sheet streams have no seekable record boundary.
- statistics() : Statistics
- The size is the listed, compressed byte count. Rows are known only when the sample schema inference already read every row of every file: OpenSpout discards the row bound of a sheet's <dimension>.
- withBatchSize() : static
- withConvertEmptyToNull() : self
- withCorruptedRecords() : static
- withHeader() : self
- withMetadataColumns() : static
- withMissingColumnsAsNull() : self
- withReader() : self
- withSchema() : static
- withSheetName() : self
Methods
__construct()
public
__construct(Path $path[, Filesystem $filesystem = new NativeLocalFilesystem() ]) : mixed
Parameters
- $path : Path
- $filesystem : Filesystem = new NativeLocalFilesystem()
__destruct()
An inference no extract() followed still holds its sample's open readers, and OpenSpout's file-based shared-strings cache leaves its temp folder behind until a reader closes.
public
__destruct() : mixed
batchSize()
public
batchSize() : int<1, max>
Return values
int<1, max>corruptedRecordsLoader()
public
corruptedRecordsLoader() : Loader|null
Return values
Loader|nullextract()
public
extract(Backend $backend, Criteria $criteria) : Generator<Signal|null, void>
Parameters
- $backend : Backend
- $criteria : Criteria
Return values
Generator<Signal|null, void>inferSchema()
public
inferSchema(SchemaInferenceBuilder $builder) : static
Parameters
- $builder : SchemaInferenceBuilder
Return values
staticisRepeatable()
public
isRepeatable() : bool
Return values
boolpartitionSchema()
public
partitionSchema() : Schema
Return values
SchemapartitionTypes()
public
partitionTypes(PartitionTypes $types) : static
Parameters
- $types : PartitionTypes
Return values
staticprunes()
public
prunes(ScalarFunction $conjunct) : bool
Parameters
- $conjunct : ScalarFunction
Return values
boolreader()
public
reader() : FileSplitReader
Return values
FileSplitReaderrefresh()
public
refresh() : void
schema()
public
schema() : Schema
Return values
Schemasource()
public
source() : Path
Return values
Pathsplits()
One split per admitted file: a workbook is a zip whose sheet streams have no seekable record boundary.
public
splits(Criteria $criteria, int $targetSplitBytes) : array<int, FileSplit>
Parameters
- $criteria : Criteria
- $targetSplitBytes : int
Return values
array<int, FileSplit>statistics()
The size is the listed, compressed byte count. Rows are known only when the sample schema inference already read every row of every file: OpenSpout discards the row bound of a sheet's <dimension>.
public
statistics() : Statistics
Return values
StatisticswithBatchSize()
public
withBatchSize(int $batchSize) : static
Parameters
- $batchSize : int
Return values
staticwithConvertEmptyToNull()
public
withConvertEmptyToNull(bool $convertEmptyToNull) : self
Parameters
- $convertEmptyToNull : bool
Return values
selfwithCorruptedRecords()
public
withCorruptedRecords(Loader|null $loader) : static
Parameters
- $loader : Loader|null
Return values
staticwithHeader()
public
withHeader(bool $withHeader) : self
Parameters
- $withHeader : bool
Return values
selfwithMetadataColumns()
public
withMetadataColumns(bool $addMetadataColumns) : static
Parameters
- $addMetadataColumns : bool
Return values
staticwithMissingColumnsAsNull()
public
withMissingColumnsAsNull(bool $missingColumnsAsNull) : self
Parameters
- $missingColumnsAsNull : bool
Return values
selfwithReader()
public
withReader(ExcelReader $reader) : self
Parameters
- $reader : ExcelReader
Return values
selfwithSchema()
public
withSchema(Schema $schema) : static
Parameters
- $schema : Schema
Return values
staticwithSheetName()
public
withSheetName(string $sheetName) : self
Parameters
- $sheetName : string