There are many ways to do this. You can find a lot of classes and object around the internet. My approach is to use Excel XML feature.
The first step is to create a template using excel and to save it as XML using Excel “Save AS”.
The next step is to open the XML file with some notepad and to analyze the structure.
The last step is to generate the structure using programming language and XML parser.
Donâ€™t forget to use right “content-type” if your application is a web project and an excel file should by downloaded and handled by the Microsoft excel and not by some xml editor. “content-type” in this case should be “application/vnd.ms-excel”
download: xml-excel.xml ()
description: example of excel xml file