how to retrieve data from sql into the excel RRS feed

  • Question

  • User-1634604574 posted

    i want to retrieve data from sql into the excel how can i do it?

    Wednesday, January 30, 2019 9:51 AM

All replies

  • User269602965 posted

    Prepare a query, connect to the database (Oracle, MSSQL, MySQL, others), open a data reader, then with the dataset you create, there are many ways to get the date moved to an Excel data grid window in a web page or WPF/WINFORM application, or into an Excel file.

    If you are doing this regularly, you can use full featured licensed Excel libraries like Spreadsheet Gear or Progress (aka Telerik), or on budget get open source libraries (google there are many), or for just get it done … .NET OPEN XML SDK. 

    Uses: quick reports like nightly audits and counts, user on screen reports of sales, generating portable datasets like customer contact lists, and many other uses.  Of course EXCEL has limitations in size of the data and rows exported.

    There is a bit of a learning curve, some experimentation to get the right look in your XLS sheet.

    Thursday, January 31, 2019 12:55 AM
  • User1520731567 posted

    Hi zhyanadil.it@gmail.com,

    i want to retrieve data from sql into the excel how can i do it?

    You could use plugins to export data to excel.

    The DataTable is exported and downloaded as Microsoft Excel file using ClosedXML Excel Library which is a wrapper for OpenXml Excel library:



    Export table to Excel file using Angularjs in asp.net MVC:


    Best Regards.

    Yuki Tao

    Thursday, January 31, 2019 7:27 AM