There are some different methods to generate Excel files. But most of them may be not usable on embedded platforms.
Creating BIFF files is a complex process due to the used MS Compound file format. There will be no simple sample code.
If your embedded platform supports ODBC, you may use this with the Excel ODBC driver.
There are also some free and commercial libraries to write Excel files. But again, most of them may not work on your embedded platform.
Libaries with available source mainly use C++ (like BasicExcel [
^]).
A commercial library that supports plain C is LibXL [
^].
As an alternative, you may generate a CSV text file that can be read by Excel.