Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insertText() with format and formatHandler ignores style font()? #472

Open
neoshiva opened this issue Mar 15, 2023 · 0 comments
Open

insertText() with format and formatHandler ignores style font()? #472

neoshiva opened this issue Mar 15, 2023 · 0 comments

Comments

@neoshiva
Copy link

I cannot set font for cells with format and formatHandler.

$excel = new \Vtiful\Kernel\Excel(['path' => "/tmp/"]);
$excel->fileName('new.xlsx','sheet1');
$format = new \Vtiful\Kernel\Format($excel->getHandle());
$style = $format->font("Arial")->fontSize(13)->toResource();
$excel->insertText(0,0,123456789,"#,##0",$style)//   Calibri
->insertText(0,1,123456789,null,$style)// Arial
->insertText(1,0,"123456789","",$style)//   Arial
->insertText(1,1,"123456789",null,$style)// Arial
->insertText(2,0,1.234,"#,##0.0",$style)//   Calibri
->insertText(2,1,1.234,null,$style)// Arial
->output();

If the value is string, font seems ok even with format.

Is this a bug?

Tested on
Mac Homebrew PHP 7.4.33
Installed via PECL and the xlswriter version is 1.5.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant