I have developed a web-based application using ASP.Net for the company I work for.
I would like to make use of the new Spreadsheet control to export data from a database to an Excel .xlsx file on the client-side. No need to view the data in the spreadsheet in the web browser. Just would like to use the Spreadsheet control to export data from a database to an Excel .xlsx file on the client-side when the user clicks on a button on the ASP.Net page.
Can that be done?
Can you provide an example on how to do that with VB.Net as the code-behind?
8 Answers, 1 is accepted
Use Kendo-UI instead of ASP.NET AJAX.
ASP.NET AJAX won't work at this moment. (I believe...)
In the example below, the database I use is MySQL.
The result like the image. The data is loaded from MySQL database first. The xlsx file can be exported by clicking the export button on the toolbar.
Could you mind deleting the password of connection string from my latest reply? Thanks.
Thanks Maxson but I would rather not make a major change to using Kendo UI. Besides in your example image, it is still displaying the spreadsheet in the browser which is not what I am looking for.
Sorry, the method i mention does not meet your requirement. But i think the small trick can be done for you. (I do not test it myself).
1. Using the method I mention before.
2. set the spreadsheet style "display:none" or very small.
Oh, but if you don't want to chage to use Kendo-UI. Sorry for the interception.
I still need help with this. I am looking for a way to do this WITHOUT using Kendo UI.
You can check the following Feature Request and use the explanations shared there:
Our thoughts here at Progress are with those affected by the outbreak.