Table of Contents
Properties
-
$mappings
: array<string|int, mixed>
-
$readDataOnly
: bool
-
$spreadsheet
: Spreadsheet
Methods
-
__construct()
: mixed
-
read()
: void
-
addBorderDiagonal()
: void
-
addBorderStyle()
: void
-
addColors()
: void
-
addStyle()
: void
-
addStyle2()
: void
-
calcRotation()
: int
-
parseBorderAttributes()
: array<string|int, mixed>
-
parseGnumericColour()
: string
-
readStyle()
: array<string|int, mixed>
-
readStyleRange()
: string
-
readStyles()
: void
$mappings
public
static array<string|int, mixed>
$mappings
= ['borderStyle' => ['0' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_NONE, '1' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN, '2' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUM, '3' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_SLANTDASHDOT, '4' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DASHED, '5' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THICK, '6' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DOUBLE, '7' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DOTTED, '8' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUMDASHED, '9' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DASHDOT, '10' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUMDASHDOT, '11' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_DASHDOTDOT, '12' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUMDASHDOTDOT, '13' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUMDASHDOTDOT], 'fillType' => [
'1' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID,
'2' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_DARKGRAY,
'3' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_MEDIUMGRAY,
'4' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_LIGHTGRAY,
'5' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_GRAY125,
'6' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_GRAY0625,
'7' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_DARKHORIZONTAL,
// horizontal stripe
'8' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_DARKVERTICAL,
// vertical stripe
'9' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_DARKDOWN,
// diagonal stripe
'10' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_DARKUP,
// reverse diagonal stripe
'11' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_DARKGRID,
// diagoanl crosshatch
'12' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_DARKTRELLIS,
// thick diagonal crosshatch
'13' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_LIGHTHORIZONTAL,
'14' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_LIGHTVERTICAL,
'15' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_LIGHTUP,
'16' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_LIGHTDOWN,
'17' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_LIGHTGRID,
// thin horizontal crosshatch
'18' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_LIGHTTRELLIS,
], 'horizontal' => ['1' => \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_GENERAL, '2' => \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_LEFT, '4' => \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_RIGHT, '8' => \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER, '16' => \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER_CONTINUOUS, '32' => \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_JUSTIFY, '64' => \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER_CONTINUOUS], 'underline' => ['1' => \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLE, '2' => \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLE, '3' => \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLEACCOUNTING, '4' => \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLEACCOUNTING], 'vertical' => ['1' => \PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_TOP, '2' => \PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_BOTTOM, '4' => \PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_CENTER, '8' => \PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_JUSTIFY]]
$readDataOnly
protected
bool
$readDataOnly
$spreadsheet
private
Spreadsheet
$spreadsheet
__construct()
public
__construct(Spreadsheet $spreadsheet, bool $readDataOnly) : mixed
Parameters
-
$spreadsheet
: Spreadsheet
-
-
$readDataOnly
: bool
-
read()
public
read(SimpleXMLElement $sheet, int $maxRow, int $maxCol) : void
Parameters
-
$sheet
: SimpleXMLElement
-
-
$maxRow
: int
-
-
$maxCol
: int
-
addBorderDiagonal()
private
addBorderDiagonal(SimpleXMLElement $srssb, array<string|int, mixed> &$styleArray) : void
Parameters
-
$srssb
: SimpleXMLElement
-
-
$styleArray
: array<string|int, mixed>
-
addBorderStyle()
private
addBorderStyle(SimpleXMLElement $srssb, array<string|int, mixed> &$styleArray, string $direction) : void
Parameters
-
$srssb
: SimpleXMLElement
-
-
$styleArray
: array<string|int, mixed>
-
-
$direction
: string
-
addColors()
private
addColors(array<string|int, mixed> &$styleArray, SimpleXMLElement $styleAttributes) : void
Parameters
-
$styleArray
: array<string|int, mixed>
-
-
$styleAttributes
: SimpleXMLElement
-
addStyle()
private
static addStyle(array<string|int, mixed> &$styleArray, string $key, string $value) : void
Parameters
-
$styleArray
: array<string|int, mixed>
-
-
$key
: string
-
-
$value
: string
-
addStyle2()
private
static addStyle2(array<string|int, mixed> &$styleArray, string $key1, string $key, string $value) : void
Parameters
-
$styleArray
: array<string|int, mixed>
-
-
$key1
: string
-
-
$key
: string
-
-
$value
: string
-
calcRotation()
private
calcRotation(SimpleXMLElement $styleAttributes) : int
Parameters
-
$styleAttributes
: SimpleXMLElement
-
parseBorderAttributes()
private
static parseBorderAttributes(SimpleXMLElement|null $borderAttributes) : array<string|int, mixed>
Parameters
-
$borderAttributes
: SimpleXMLElement|null
-
Return values
array<string|int, mixed>
parseGnumericColour()
private
static parseGnumericColour(string $gnmColour) : string
Parameters
-
$gnmColour
: string
-
readStyle()
private
readStyle(array<string|int, mixed> $styleArray, SimpleXMLElement $styleAttributes, SimpleXMLElement $style) : array<string|int, mixed>
Parameters
-
$styleArray
: array<string|int, mixed>
-
-
$styleAttributes
: SimpleXMLElement
-
-
$style
: SimpleXMLElement
-
Return values
array<string|int, mixed>
readStyleRange()
private
readStyleRange(SimpleXMLElement $styleAttributes, int $maxCol, int $maxRow) : string
Parameters
-
$styleAttributes
: SimpleXMLElement
-
-
$maxCol
: int
-
-
$maxRow
: int
-
readStyles()
private
readStyles(SimpleXMLElement $styleRegion, int $maxRow, int $maxCol) : void
Parameters
-
$styleRegion
: SimpleXMLElement
-
-
$maxRow
: int
-
-
$maxCol
: int
-