Aside, with respect to spreadsheets:
- Try csv first. If you don't have any special characters, you can just print OUT "val1,val2,val3\n"; or use the CSV modules for formatting...
- If you are doing microsoft excell, consider SpreadSheet-WriteExcel
Cheers.