Export data to Excel from Silverlight/WPF DataGrid

Data export from DataGrid to Excel is very common task, and it can be solved with different ways, and chosen way depend on kind of app which you are design. If you are developing app for enterprise, and it will be installed on several computes, then you can to advance a claim (system requirements) with which your app will be work for client. Or customer will advance system requirements on which your app should work. In this case you can use COM for export (use infrastructure of Excel or OpenOffice). This approach will give you much more flexibility and give you possibility to use all features of Excel app. About this approach I’ll speak below. Other way – your app is for personal use, it can be installed on any home computer, in this case it is not good to ask user to install MS Office or OpenOffice just for using your app. In this way you can use foreign tools for export, or export to xml/html format which MS Office can read (this approach used by JIRA). But in this case will be more difficult to satisfy user tasks, like create document with landscape rotation and with defined fields for printing.

At this article I'll show you how to work with Excel object from .NET 4 and Silverlight 4 with dynamic objects and give you an approach which allow you to export data from DataGrid Silverlight and WPF controls.



  • I love your homepage, the way I love air. Ok just kidding but really good explanations though .

  • Its a great start of the day with a website like this. very informative , im now one of the regular visitor of your web. Thanks.

  • I feel strongly about information and love learning more on this. If possible, as you gain expertise

  • Thanks for a nice post you have given to us with such an large collection of information. we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them.

  • I try to apply your code to implement the excel export for QueryWithoutMap datagrid data via Export button, but the result just empty data? Here is the link http://help.arcgis.com/en/webapi/sil...ueryWithoutMap for visualize what I need on data to export. Can you tell me whether your export function only work on Out of Browser option? Any helps to solve my issues are much appreciated. Thanks.

  • I am really impressed with your writing skills as well as with the layout on your blog.
    Is this a paid theme or did you customize it yourself?
    Either way keep up the excellent quality writing, it's rare to see a nice blog like this one today.

  • Ahaa, its pleasant discussion concerning this piece
    of writing at this place at this blog, I have read all that, so at this time me also commenting here.

  • Amazing! This blog looks just like my old one! It's on a completely different topic but it has pretty much the same page layout and design. Superb choice of colors!

  • Hi, I do believe your website might be having internet
    browser compatibility issues. When I take a look at your website in Safari, it looks fine however, when opening in
    Internet Explorer, it's got some overlapping issues. I merely wanted to provide you with a quick heads up! Other than that, fantastic website!

  • I'm not sure where you are getting your information, but great topic. I needs to spend some time learning more or understanding more. Thanks for wonderful info I was looking for this information for my mission.

  • I have been surfing online more than three hours these days, but I by no means discovered any interesting article
    like yours. It is beautiful worth sufficient for
    me. Personally, if all webmasters and bloggers made just right content material as you probably
    did, the net shall be much more helpful than ever before.

  • Hi there, I log on to your blog regularly.
    Your story-telling style is witty, keep doing what you're doing!

  • Hi, Neat post. There's a problem together with your web site in internet explorer, would test this? IE still is the marketplace leader and a large section of folks will miss your fantastic writing because of this problem.

  • You have made some really good points there. I checked on the internet to learn more about the issue and found most individuals will go along with your views on this web site.

  • I visited several web pages but the audio quality for audio songs current at this web page is genuinely superb.

  • It's the best time to make some plans for the longer term and it's time to be happy.
    I have learn this publish and if I may I wish to recommend you some fascinating issues or tips.
    Maybe you can write subsequent articles referring to this article.
    I want to learn even more issues approximately it!

  • Howdy, I think your blog could be having web browser compatibility problems.
    When I look at your web site in Safari, it looks fine however, when opening in IE,
    it's got some overlapping issues. I just wanted to provide you with a quick heads up! Besides that, wonderful site!

  • I love what you guys tend to be up too. This kind of
    clever work and reporting! Keep up the good works guys I've incorporated you guys to our blogroll.

  • I have been surfing online more than 4 hours today, yet I never found any interesting article like yours.
    It's pretty worth enough for me. In my opinion, if all web owners and bloggers made good content as you did, the internet will be much more useful than ever before.

  • Amazing, exactly gorgeous! Love to find reviews who make you feel fantastic. To bad this time we do not secure greater number of these.It crafted this heart and soul satisfaction…………

  • Thanks in support of sharing such a pleasant thinking,
    paragraph is fastidious, thats why i have read it entirely

Comments have been disabled for this content.