ExcelReadOptions
Read onlyYes
FinalYes
Properties
- $convertEmptyToNull : bool
- $format : ExcelReader|null
- $missingColumnsAsNull : bool
- $sheetName : string|null
- $withHeader : bool
Methods
- __construct() : mixed
- fromArray() : self
- normalize() : array{with_header: bool, convert_empty_to_null: bool, sheet_name: null|string, format: null|string, missing_columns_as_null: bool}
- withConvertEmptyToNull() : self
- withFormat() : self
- withHeader() : self
- withMissingColumnsAsNull() : self
- withSheetName() : self
Properties
$convertEmptyToNull
public
bool
$convertEmptyToNull
= true
$format
public
ExcelReader|null
$format
= null
$missingColumnsAsNull
public
bool
$missingColumnsAsNull
= true
$sheetName
public
string|null
$sheetName
= null
$withHeader
public
bool
$withHeader
= true
Methods
__construct()
public
__construct([bool $withHeader = true ][, bool $convertEmptyToNull = true ][, string|null $sheetName = null ][, ExcelReader|null $format = null ][, bool $missingColumnsAsNull = true ]) : mixed
Parameters
- $withHeader : bool = true
- $convertEmptyToNull : bool = true
- $sheetName : string|null = null
- $format : ExcelReader|null = null
- $missingColumnsAsNull : bool = true
fromArray()
public
static fromArray(array<string|int, mixed> $data) : self
Parameters
- $data : array<string|int, mixed>
-
the shape of normalize()
Return values
selfnormalize()
public
normalize() : array{with_header: bool, convert_empty_to_null: bool, sheet_name: null|string, format: null|string, missing_columns_as_null: bool}
Return values
array{with_header: bool, convert_empty_to_null: bool, sheet_name: null|string, format: null|string, missing_columns_as_null: bool}withConvertEmptyToNull()
public
withConvertEmptyToNull(bool $convertEmptyToNull) : self
Parameters
- $convertEmptyToNull : bool
Return values
selfwithFormat()
public
withFormat(ExcelReader $format) : self
Parameters
- $format : ExcelReader
Return values
selfwithHeader()
public
withHeader(bool $withHeader) : self
Parameters
- $withHeader : bool
Return values
selfwithMissingColumnsAsNull()
public
withMissingColumnsAsNull(bool $missingColumnsAsNull) : self
Parameters
- $missingColumnsAsNull : bool
Return values
selfwithSheetName()
public
withSheetName(string $sheetName) : self
Parameters
- $sheetName : string