Before saving the results, consider shaping up the data as you need present. At a first step, check and process the contents.
If you plan to save the work in Excel (or HTML), then consider adding styles such as applying colors, different typefaces, freezing the header row, adjusting column width, applying autofilters, etc.
Do some validation on this table:
table style theme ( countries, Zebra, pattern, 2 );
table style auto width ( countries, min, 12 );
table style table ( countries, sheet, freeze rows, 1, autofilter, 0 );
echo("Formatting done.");
Formatting done.