fopen() the file with "wb" (write binary) mode, and
then fwrite() or fprintf() or putc() or fputc() whatever you need to.
You should probably avoid putw() and fputs(), though:
putw() works in terms of the type "int", which is not the same
size on all systems; and fputs() includes a terminating newline,
which is not the same character(s) on all systems.
What you need now is to know what the structure is of an excel file.
That's a topic beyond the scope of standard C, and is
subject to change without notice from Microsoft ("Documenting
a file structure hurts our ability to innovate!!") Inc.
You can find a long paper on the file format by googling for
excel file structure
for example,
http://sc.openoffice.org/excelfileformat.pdf
has OpenOffice's documentation up to Excel 2003. You will likely
find the mass of information there rather daunting, and chances
are extremely high that if you were to attempt to implement the
full range yourself that you (or anyone) would make mistakes.
I would therefor suggest to you that you should either attempt to
find a pre-written Excel library (perhaps OpenOffice offers one),
or else that you take a big portability hit by confining yourself
to Windows and using one of Microsoft's development APIs.
Microsoft's APIs are discussed in microsoft-specific newsgroups.