You cannot write directly to an *.xls file and expect Excel to read it because *.xls files are not plain text files -- they contain a lot of formatting information that is readable only by Excel program.
The easiest way to do it is to creates *.csv files which Excel can import. Fieids (cells) are commma or sometimes tab separated, with CR/LF between each row. Using your example you might write it like this: Text should be surrounded with quotes (see first example below)
myfile << "\"Hello World\"," << nums[1] << "," << nums[2] << "," nums[3] << "\n";
or
myfile << nums[1] << "\t" << nums[2] << "\t" nums[3] << "\n";