Are you looking to create an XLSX format or a CSV format? Are you looking to do this in c# or VB or some other language? You can check out a c# example here.
Register Hereor login if you are already a member
You must have excel installed on your system for this code to run properly. To access the object model from c# .net, you have to add the MS excel 15.0 object library to your project.