This project contains a sample using Open XML library to write out a spreadsheet. The sample shows both code for doing this from within code as well as using a pre-defined style.
The .xlsx file is a zip file that contains the content of the work book. If you rename an xlsx file to zip and open the zip file, the files making up the spreadsheet including the style sheet of the spreadsheet can be accessed.
The Open XML SDK can be downloaded from here