Export to Excel WITHOUT DATAGRID RRS feed

  • Question

  • User-1557899894 posted

    Nice day for all of you.

    I wanna export some data from MySql to Excel, allowing user make download it to your own pc.
    Any examples which I found on web is just about the use of datagridview and I don't wanna to use datagrid because all my program uses Javascript and WebService to make connections and queries to database, thus avoiding the page do postback.

    I wanna that program make export by dataset or datatable, directly.
    There's any way to do this?

    Wednesday, October 8, 2014 10:00 AM


  • User-760709272 posted

    Look into the Open XML SDK or Aspose, both are libraries that let you create Office files.  If you're desperate you can also look at the OLEDB Excel provider which lets you treat Excel sheets like databases, and create rows using INSERT statements.

    They're you only real options though with the Open XML SDK probably being your best bet.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 8, 2014 10:12 AM