openspout icon indicating copy to clipboard operation
openspout copied to clipboard

Inconsistent number of cells per row

Open ostrolucky opened this issue 7 months ago • 5 comments

If I read Excel_template_500Users.xlsx, rows until row 16 (Uer15) have consistent dimension (20 cells), after that (User16) it's reduced to 5 cells

ostrolucky avatar Dec 13 '23 12:12 ostrolucky

What do you mean by "read"? Can you translate your issue into a reproducible test case?

Slamdunk avatar Dec 13 '23 13:12 Slamdunk

This should reproduce the issue

$reader = new \OpenSpout\Reader\XLSX\Reader();
$reader->open($filePath);
foreach ($reader->getSheetIterator() as $sheet) {
  foreach ($sheet->getRowIterator() as $key => $row) {
    var_dump($key, $row->toArray());
  }    
}

ostrolucky avatar Dec 13 '23 13:12 ostrolucky

We have run into this problem again.

It's entirely different file, but dimensions change again after key 16

ostrolucky avatar Apr 04 '24 13:04 ostrolucky