PhpSpreadsheet/docs/Overview/11-Appendices.md
2016-11-28 00:51:44 +09:00

3.0 KiB

PhpSpreadsheet Developer Documentation

Credits

Please refer to the internet page http://www.codeplex.com/PHPExcel/Wiki/View.aspx?title=Credits&referringTitle=Home for up-to-date credits.

Valid array keys for style applyFromArray()

The following table lists the valid array keys for \PhpOffice\PhpSpreadsheet\Style applyFromArray() classes. If the "Maps to property" column maps a key to a setter, the value provided for that key will be applied directly. If the "Maps to property" column maps a key to a getter, the value provided for that key will be applied as another style array.

\PhpOffice\PhpSpreadsheet\Style

Array key    | Maps to property
-------------|-------------------
fill         | getFill()
font         | getFont()
borders      | getBorders()
alignment    | getAlignment()
numberformat | getNumberFormat()
protection   | getProtection()

\PhpOffice\PhpSpreadsheet\Style\Fill

Array key  | Maps to property
-----------|-------------------
type       | setFillType()
rotation   | setRotation()
startcolor | getStartColor()
endcolor   | getEndColor()
color      | getStartColor()

\PhpOffice\PhpSpreadsheet\Style\Font

Array key   | Maps to property
------------|-------------------
name        | setName()
bold        | setBold()
italic      | setItalic()
underline   | setUnderline()
strike      | setStrikethrough()
color       | getColor()
size        | setSize()
superScript | setSuperScript()
subScript   | setSubScript()

\PhpOffice\PhpSpreadsheet\Style\Borders

Array key         | Maps to property
------------------|-------------------
allborders        | getLeft(); getRight(); getTop(); getBottom()
left              | getLeft()
right             | getRight()
top               | getTop()
bottom            | getBottom()
diagonal          | getDiagonal()
vertical          | getVertical()
horizontal        | getHorizontal()
diagonaldirection | setDiagonalDirection()
outline           | setOutline()

\PhpOffice\PhpSpreadsheet\Style\Border

Array key | Maps to property
----------|-------------------
style     | setBorderStyle()
color     | getColor()

\PhpOffice\PhpSpreadsheet\Style\Alignment

Array key   | Maps to property
------------|-------------------
horizontal  | setHorizontal()
vertical    | setVertical()
rotation    | setTextRotation()
wrap        | setWrapText()
shrinkToFit | setShrinkToFit()
indent      | setIndent()

\PhpOffice\PhpSpreadsheet\Style\NumberFormat

Array key | Maps to property
----------|-------------------
code      | setFormatCode()

\PhpOffice\PhpSpreadsheet\Style\Protection

Array key | Maps to property
----------|-------------------
locked    | setLocked()
hidden    | setHidden()