diff --git a/src/ext/spout/SpoutBuilder.php b/src/ext/spout/SpoutBuilder.php index 3d84e48..db6a698 100644 --- a/src/ext/spout/SpoutBuilder.php +++ b/src/ext/spout/SpoutBuilder.php @@ -91,6 +91,7 @@ class SpoutBuilder extends AbstractBuilder { if (($align = $cell["align"] ?? null) !== null) $style->setCellAlignment($align); if (($align = $cell["valign"] ?? null) !== null) $style->setCellVerticalAlignment($align); if (($wrap = $cell["wrap"] ?? null) !== null) $style->setShouldWrapText($wrap); + if (($rotation = $cell["rotation"] ?? null) !== null) $style->setTextRotation($rotation); if (($format = $cell["format"] ?? null) !== null) $style->setFormat($format); if (($border = $cell["border"] ?? null) !== null) { if (is_string($border)) { @@ -128,6 +129,7 @@ class SpoutBuilder extends AbstractBuilder { self::add_border_part($parts, "left", $border["left"] ?? null); if ($parts !== null) $style->setBorder(new Border(...$parts)); } + if (($autofit = $cell["autofit"] ?? null) !== null) $style->setShouldShrinkToFit($autofit); return $style; } diff --git a/src/ref/ext/spout/ref_builder.php b/src/ref/ext/spout/ref_builder.php index 9bc7701..e84cfaa 100644 --- a/src/ref/ext/spout/ref_builder.php +++ b/src/ref/ext/spout/ref_builder.php @@ -82,6 +82,7 @@ class ref_builder { "align" => "string", "valign" => "string", "wrap" => "bool", + "rotation" => "int", "format" => "string", "border" => [ "top" => ["color" => "string", "width" => "string", "style" => "string"], @@ -89,5 +90,6 @@ class ref_builder { "bottom" => ["color" => "string", "width" => "string", "style" => "string"], "left" => ["color" => "string", "width" => "string", "style" => "string"], ], + "autofit" => "bool", ]; }