2
1

More than 3 years have passed since last update.

PhpSpreadsheetでメモリ爆喰い または、変更してないセルの書き込みで落ちる場合の対処法

Posted at

writeCellFormula, Cell , Coordinate 関係でエラー落ちする場合

どうやら、PhpSpreadsheetさんは式を解決してからファイルを保存してくれるらしい。
しかし、複雑な式を書いていると無限ループになったり、うまく計算できず落ちてしまうっぽい
Excel上でならうまく処理してくれる場合でも、だ。

そういう時(XlsxWriterに対して)は

$writer->setPreCalculateFormulas(false);

を加えて事前計算処理をスキップさせる事ができるようだ。

https://phpspreadsheet.readthedocs.io/en/latest/topics/reading-and-writing-to-file/
ここを読んでいて見つけた。

次同じようなハマり方をした同志の為になればと。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1