Shami96 commited on
Commit
c695f61
·
verified ·
1 Parent(s): 22b9cc9

Update updated_word.py

Browse files
Files changed (1) hide show
  1. updated_word.py +4 -2
updated_word.py CHANGED
@@ -727,12 +727,14 @@ def handle_attendance_list_table_enhanced(table, flat_json):
727
  print(f" ❌ No attendance data found in JSON")
728
  return 0
729
 
 
730
  # Format the attendance data
731
  if isinstance(attendance_value, list):
732
- formatted_attendance = '\n'.join(str(item) for item in attendance_value if str(item).strip())
 
733
  else:
734
  formatted_attendance = str(attendance_value)
735
-
736
  print(f" 📝 Final formatted attendance:\n{formatted_attendance}")
737
 
738
  # 🔧 CRITICAL FIX: Look for red text in ALL cells of the table, not just the header
 
727
  print(f" ❌ No attendance data found in JSON")
728
  return 0
729
 
730
+ # Format the attendance data
731
  # Format the attendance data
732
  if isinstance(attendance_value, list):
733
+ # Each item in the list should be on a separate line
734
+ formatted_attendance = '\n'.join(str(item).strip() for item in attendance_value if str(item).strip())
735
  else:
736
  formatted_attendance = str(attendance_value)
737
+
738
  print(f" 📝 Final formatted attendance:\n{formatted_attendance}")
739
 
740
  # 🔧 CRITICAL FIX: Look for red text in ALL cells of the table, not just the header