.net C# Flex datagrids and Excel

by 10:36 AM 0 comments
A few people have contacted me via live chat and also via comments regarding Flex Data grid to excel post that they would like to see how to do the same thing with .NET

I made a quick demo where I pull a RSS feed with .NET, parse out a few columns and return the result to a small Flex app. Flex will handle the .NET objects as generic objects and you can cast the array to an arrayCollection and simply use this as the data provider for a datagrid.

I then used almost the same code to build up a post string as I was with ColdFusion and PHP however the spark grid is a little bit different and required some small changed.

With .NET we have access to Excel libraries which I used to generate real Excel documents where you can set styles and sheet names easily.

The app does a simple post back to a .NET page and generates a excel document on the fly and streams it back to the user.

There are many ways to do the same thing here is just one way. Currently in our apps we typically write the file out to disk and provide a download link as the front end to our .NET applications are pure html.

View source is enabled on the Flex widget at the bottom of the demo.


Direct Link.

Create excel:

Direct Link.

Demo App:


Post a Comment