Hi
If you for some reason cannot use CSV files, or you want coloring or cell formating, you can write Excel files with Perl:
http://search.cpan.org/dist/Spreadsheet-WriteExcel/
You need to install the Perl module first. On Debian/Ubuntu:
sudo apt-get install libspreadsheet-writeexcel-perl
It also installs many nice examples in /usr/share/doc/libspreadsheet-writeexcel-perl/