Skip to content

Commit

Permalink
feat: automatically convert stringable value to string in OpenSpout e…
Browse files Browse the repository at this point in the history
…xporters
  • Loading branch information
Kreyu committed Jan 22, 2024
1 parent 8beb61d commit 133c2ad
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,14 @@ protected function getValueRowCells(ValueRowView $view, array $options): array

protected function getValueCell(ColumnValueView $view, array $options): Cell
{
$value = $view->vars['value'];

if ($value instanceof \Stringable) {
$value = (string) $value;
}

return Cell::fromValue(
value: $view->vars['value'],
value: $value,
style: $this->getStyle($view, 'value_cell_style', $options),
);
}
Expand Down

0 comments on commit 133c2ad

Please sign in to comment.