I write a lot of data-focused applications, a lot of grids, reports updates and inserts. It’s the usual stuff the business wants, Flex and Coldfusion work really well together for this sort of thing. We produce quite a few custom reports using the often unknown little gem that comes for free with cf Coldfusion Report Builder. It can be clunky but I doubt there is a quicker way to produce what we need.
When all this is said and done and we are happy with what we have produced ( and so is the business of course ) they seem to inevitably come back with “This report is great, any chance I can get it in excel?”
As per usual it was required ASAP. We already write out several reports into excel but each report is different and I was after a generic solution. I was directed to this article by Dale Fraser: http://www.cflex.net/showfiledetails.cfm?ObjectID=298
Which didn’t really work and had a few issues not surprising it was for Flex 1. Plus I felt that all the HTML was unnecessary and I was after a cleaner simpler solution. I didn’t want to restrict the use to IE either so the js was to go aswell. What I came up with was a solution that loops the datagrid columns ( hidden and seen ) and produces a tab separated block of text that will paste into excell perfectly separating the grid columns into nice excel columns. It even takes into consideration label functions. The accountants where happy and could now paste into excel with 1 click and manipulate the data in anyway they want.
You can see an example of this where I grab the rss feed from fullasagoog and tidy it up a bit and put it in a grid. Let the grid load up, click copy, open excel, click in a cell and paste. It works on mac and windows ( I’ll assume linux my desktop is at home so I cant test ) in ie, safari and firefox.
http://code.kukiel.net/dgc
I also enabled code view.
Subscribe to:
Post Comments (Atom)
Categories-
- Actionscript (5)
- Adobe (8)
- AIR (3)
- Apple (2)
- BlackBerry (1)
- CFML (59)
- ColdFusion (84)
- ColdFusion 8 (12)
- ColdFusion 9 (28)
- Database (2)
- Flash (11)
- Flash 10 (6)
- FlashBuilder (4)
- Flex (31)
- Internet Explorer (1)
- iPhone (4)
- Java (8)
- jQuery (1)
- Linux (8)
- Microsoft (5)
- Open Blue Dragon (10)
- Open Source (11)
- Operating Systems (3)
- PHP (1)
- Railo (24)
- SQL (3)
- SVN (2)
- Twitter (2)
- VPS (1)
- Windows (5)

Blog Archive
-
►
2010
(38)
-
►
August
(9)
- ColdFusion and cfquerynew and date times - timesta...
- ColdFusion Lists, SQL IN and cfqueryparam
- iPhone and Flash - Sucess
- ColdFusion jrun and the JVM
- ColdFusion and CFReport
- jQuery or EXTjs
- iPhone 3Gs and Flash player
- Easy way to embed ColdFusion code into your blog
- Flex and the MATE framework in Melbourne
-
►
August
(9)
-
►
2009
(89)
-
►
December
(17)
- ColdFusion 9 and the local scope continued
- Is this an issue with the local scope in ColdFusio...
- Are you using ColdFusion 9's ORM?
- Want more performance from a default Railo install...
- WizzyWig the comic and snow
- Linux Start and Stop scripts for Ventrilo - Ubuntu...
- ColdFusion Builder Beta 3 - Any one seen this?
- Streaming AMF channel with ColdFusion 9 and BlazeD...
- Forwarding or masking your domain with GoDaddy
- Cheap ColdFusion hosting
- Should I get an iPhone?
- Full Screen Flex
-
►
December
(17)
Reccomended:
- TweetTrail
- Load Cell
- MyTouch Cases
- View Prom Hairstyles
- Cell Phone Accessories
- business operating agreement
- learn how to recycle electronics



3 comments:
I made a blog post about this. Check it out and let me know if it helps you
http://www.cftips.net/post.cfm/converting-flex-3-datagrid-to-excel-sheet
Hmmm looks like fullasagoog changed the RSS feed I will have to update this code to reflect the new changes.
Thanks for the blog, great information!
Post a Comment