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

fix: 内存模式下,设置单个单元格内容格式,内存模式会失效,导致内存不断堆叠溢出 #455

Open
mingdiantianxia opened this issue Sep 29, 2022 · 0 comments
Assignees

Comments

@mingdiantianxia
Copy link

mingdiantianxia commented Sep 29, 2022

$config     = ['path' => '/'];
$excel = new \Vtiful\Kernel\Excel($config); 
$fileObject = $excel->constMemory('test.xlsx', '内存占用', false);
for ($index = 0; $index < 10000; $index++) {
    for ($column = 0; $column < 300; $column++) {
        $mem = self::getMemoryUsage('MemRealUsage');
        $mem = $mem / (1024 * 1024);
        $fileObject->insertText($index+1, $column, floatval($mem), 'Max$#,##0.00;Max$-#,##0.00');
        var_dump($mem);
    }
}
$filePath = $fileObject->output();
$fileObject->close();
@viest viest self-assigned this Oct 9, 2022
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