How to export data from ASP.NET to both Excel and OpenOffice.

More precisely you'll see

  1. how easy is to export data from a gridview to a single sheet Excel workbook
  2. how you can export data from asp.net to multisheet Excel/OpenOffice workbooks

Note: Colors' choice was not the main objective of this demo.

Category NameProduct NameProduct Sales
Meat/PoultryAlice Mutton16.580,85
CondimentsAniseed Syrup1.724,00
SeafoodBoston Crab Meat9.796,33
Dairy ProductsCamembert Pierrot20.652,28
SeafoodCarnarvon Tigers15.950,00
BeveragesChai4.887,00
BeveragesChang7.038,55
BeveragesChartreuse verte4.475,70
CondimentsChef Anton's Cajun Seasoning5.214,88
CondimentsChef Anton's Gumbo Mix373,63
ConfectionsChocolade1.282,01
BeveragesCôte de Blaye46.563,09
SeafoodEscargots de Bourgogne2.076,28
Grains/CerealsFilo Mix2.068,15
Dairy ProductsFlotemysost9.642,76
123456

1) Select either Excel XML or XLSX output format:

2) Then push a button to run the export to Excel/OpenOffice

Home