Ok, I have read a number of posts on the forum about exporting data from a WPF datagrid (from the WPF toolkit). So that I have a pretty good understanding of.
My question is this : I have a WPF application that connects to a SQL 2008 database. When a user clicks a "generate report" button on my WPF form, a call is made to a stored procedure in the database, and a data table with all of the requested data
is returned to the application. What I need to do is turn this data table into an Excel document.
From what I have read, it seems to me that I am going to have to put a data grid, one that is not visible perhaps, on my WPF form, bind the data table to it, and then do the export/transform to an Excel document from there. Does that sound correct, or is
there perhaps some other way to do it that I am not seeing or aware of? I have done this in web projects, and it is fairly easy to create a string with the contents of the data returned from the db and then write that string to the Response object. But in
WPF, or Winforms, I am not finding it so easy. I appreciate all answers : )
View Complete Post