insertNewRowBefore($currentRow + 1, 1); // Set values (Columns A, B, C, D as per TpCreatorService logic) $sheet->setCellValue("A" . $currentRow, $rowNo); $sheet->setCellValue("B" . $currentRow, $doc['title2'] ?? ''); $sheet->setCellValue("C" . $currentRow, $doc['title3'] ?? ''); // Title 3 is usually extracted filename or specific detail $sheet->setCellValue("D" . $currentRow, $date); // Increment $currentRow++; $rowNo++; } }