aVadim483 / fast-excel-reader

Lightwight and very fast XLSX Excel Spreadsheet Reader in PHP
MIT License
63 stars 16 forks source link

Get all cells in text format #20

Closed vdussan closed 8 months ago

vdussan commented 8 months ago

Currently when using the $sheet->readRows() method;

This returns the contents of the cells converted to integers, I need to get the cells in text format.

aVadim483 commented 8 months ago
$result = [];
$sheet->readCallback(function ($row, $col, $val) use(&$result) {
    $result[$row][$col] = (string)$val;
});
var_dump($result);
darmadiff commented 4 months ago

I try this method, but when I fill cell with leading zero then it will be eliminated. Something like 043435543 will be 43435543.