Skip to content

Format parameter in insertText() ignores some styles and values #545

@MonkeyMaster

Description

@MonkeyMaster

The code below inserts four cells with the same style, however, the font is not applied to the cells where format is specified.
Also one of the formats is ignored.

$excel = new \Vtiful\Kernel\Excel($config);
$file = $excel->fileName("free.xlsx");
$handle = $file->getHandle();
$format = new \Vtiful\Kernel\Format($handle);
$style = $format->font('Arial')->bold()->toResource();

$file->insertText(0, 0, 1000, null, $style);
$file->insertText(0, 1, 1000, null, $style);

$file->insertText(1, 0, 1000, '#,##0.00', $style);
$file->insertText(1, 1, 1000, '#,##0.0000', $style);

$file->output();

изображение

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions