Re: Formatting Excel File
XLS are binary files so you have to open them as a binary, but then you can read only raw bytes of that file, because there is no such API in Qt that allows you to manipulate XLS files on some higher level than bytes. So you have to find some library that can do this or you have to know the format of the xls file to understand what bytes you read mean.
P.S. Different thing is with xlsx and docx new formats, because they are just zipped set of xml files, so you can use than for example DOM API in Qt, but you still have to know what that tags, attributes and values mean - you have to know the file format, structure.
Re: Formatting Excel File
Excel works quite well with HTML formatted files. If you generate an HTML table with colored cells and write it to a file with .xls extension (even when in reality its a text based HTML file), Excel will detect this and render the resulting table quite nicely.
Of course this only works with rather simple tables, I don't know if you can have formula's and such.