in reply to Excel file in perl program

Is the
# Write the data
(a) verbatim from your program, or is it (b) just a placeholder for the code to, umm..., write the data? It looks to me that the code to actually write the data is either (a) missing, or (b) doing something wrong.