0

I'm working on 'mvc3 Razor' application under 'IIS7', I want the generate an excel file (.xls or .xlsx) which get the data from a database with a specific colors and format and with a good performance. How can i do this?

  • There's a lot of info here: http://stackoverflow.com/questions/151005/create-excel-xls-and-xlsx-file-from-c-sharp – Giovanni B Aug 06 '12 at 13:55

2 Answers2

0

You can use one of the libraries which allow you to create and manipulate Excel files, like EPPlus (open source) or Aspose (commercial). I have a positive experience with the latter.

twoflower
  • 6,788
  • 2
  • 33
  • 44
0

Take a look at this previous question . You can probably adjust it to your needs. That one generates an Excel file from a DataSet. Perhaps you could fill that DataSet with your database and then call that method.

Enjoy,

Community
  • 1
  • 1
eburgos
  • 2,022
  • 17
  • 11