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

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

Open
MonkeyMaster opened this issue Jan 13, 2025 · 1 comment
Open

Comments

@MonkeyMaster
Copy link

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();

изображение

@David-Dadon
Copy link

David-Dadon commented Jan 17, 2025

Hi,

I can confirm that this issue occurs in versions 1.5.6, 1.5.7 and 1.5.8 of this plugin, when we try to format as percentage it formats the cell with date

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

$file->insertText(0, 0, 0.5, '0%');

$file->output();

Image

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

2 participants