"AIR 2 Excel" Sample App Updated for AIR 2 GA

I updated the “AIR 2 Excel” sample application for the official AIR 2 launch. “AIR 2 Excel” demonstrates different techniques for AIR/Excel integration, including the new AIR 2 File.openWithDefaultApplication() API.

In Adobe AIR 1.0 and 1.5, there were different options to “open” the data of a Flex DataGrid in Excel. For example, you could leverage the AIR native drag-and-drop support to drag rows from the DataGrid to an open Excel spreadsheet. You could also drag rows to the desktop (or anywhere on the file system) as an .xls file. These two approaches are demonstrated in my Salesbuilder sample application. Another approach was to use a server roundtrip to download the generated .xls file from the server and force Excel to open with the data.

There was however no immediate way to implement a straight (client-side only) “Open in Excel” feature (aka click a button to open your DataGrid data in Excel). With AIR 2.0 and the new File.openWithDefaultApplication() method this becomes extremely easy to implement. In the sample below, I provide an example of this new feature. The sample also supports the drag-and-drop approach from the AIR application to Excel and from the AIR application to the desktop (or anywhere else on the file system). This sample uses the as3xls library to create the Excel spreadsheet. View Source is enabled.

Make sure you have the AIR 2 runtime installed (you can download the AIR 2 runtime here), and install the application using the badge below:

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.

View Source (right click) is enabled.

NOTE: You can download the AIR 2 SDK here.

Comments

  1. Nathan5x says:

    Interesting and much needed feature.. ;)

    Thanks for sharing this..

  2. Robert says:

    Looks interesting, thanks for sharing!

  3. Thanks. I tried and i get this error:
    Source could not be found for flash.filesystem.file…
    can you help any in this regard as i cant find anything on web

  4. Damien says:

    @zahid

    I had the same problem.

    Solution :
    Update your Air SDK to 2.0, and change the line of your xml application description

    Thank Christophe for your great blog !

  5. For finance, when a place adopts a precipitation it is previously promoting in a company absence – a diversity’s stone is n’t a caliph record.

    percocet ingredients
    buy percocet

  6. Mark says:

    Hi Christophe,

    I have been unable to find the source to this project… am I missing something?

    Thanks for all of your great work!

  7. Raj says:

    Christophe,

    Nice AIR app. I had to develop a Flex app where it should load an excel file and display contents in DataGrid with Flash Player 9.0, not an AIR app. Please let me know how this can be achieved!!
    Thanks in advance.

    Raj.

Trackbacks

  1. [...] Christophe Coenraets Rich Internet Applications, Flex, AIR, Java Skip to content BioUsing Flex with Spring « “AIR 2 Excel” Sample App Updated for AIR 2 GA [...]

  2. [...] Exploring the “open with default application” API [...]

Speak Your Mind

*