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

#单元格样式#在插入公式的同时,怎么给公式所在的单元格设置样式? #522

Open
Sparkinzy opened this issue Aug 29, 2024 · 0 comments

Comments

@Sparkinzy
Copy link

Sparkinzy commented Aug 29, 2024

$excel = new \Vtiful\Kernel\Excel($config);

$freeFile = $excel->fileName("free.xlsx")
    ->header(['name', 'money']);

for($index = 1; $index < 10; $index++) {
    $freeFile->insertText($index, 0, 'viest');
    $freeFile->insertText($index, 1, 10);
}

$freeFile->insertText(12, 0, "Total");
$freeFile->insertFormula(12, 1, '=SUM(B2:B11)');

在上面的代码中, 第十二行,第二列的单元格,通常为:B12 ,设置了一个求和的公式,但是这个B12 目前无法手动设置单元格样式

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