
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.

WOW.. This is what I’m waiting for the long…
Thanks Christophe… AIR Rocks..
Wow. Thanks for article.
Hi Christ,
When I run your salesbuilder-v2, I got several errors related to ilog.utils
such as:
Definition ilog.utils:GregorianCalendar could not be found.
Definition ilog.utils:TimeUnit could not be found
Could you let me know where I can find the ilog.utils package?
Thank you!
oh,…actually, I worked it out.
That is a nice sample. Is there any way to Read Excel file ?
Also, since Excel 2007 there is a new nice file format – XLSX, which is compressed XML file.
Any integration with that ? In fact, how can one read/write compressed files in AIR.
In addition, there is a Java API called Apache POI, which works with XLS and XLSX.
Any integration with that ?
TIA,
Oleg.
Just what I was looking for – many thanks
Trying to install the AIR2Excel.air file and getting the following error:
This application requires an update to Adobe AIR that is not available for your system.
Please view the system requirements for Adobe AIR and update your system accordingly.
I am running the latest Air 2 beta 2. Any idea?
Thanks.
Christophe,
It was great meeting you in Tampa last month.
Just wanted to see if you could update your example to work with AIR 2 beta 2.
Thanks,
Jeff Boothe
Hi,
Is there any way i can read an Excel file in AIR?
Thanks,
Chinmay
thats what i want.
thanks alott
Hi,
Thanks for sharing.
I have done some research about export data to excel file for a while.Right now, it seems that the project as3xls could not support export data to excel file with formula and format.I would apprecaite if you could give some suggestion about how to implement that functionality with formula and format.
Thanks,
Regards!
liu,meng-meng
thats what i want.
thanks alott
Hi,
Thanks for sharing,
How to read the header data.
Thanks,
Srinath
How to export grouped datagrid to Excel
Thanks
Srinath
Where can I find the source code for this application?
Thanks. someone saved my life
thank you very nice excel very good
Always in Stock, Lowest Prices, Huge Selection, and Super Fast Shipping. Cherokee Workwear, Studio B, BabyPhat, Scrubs HQ, Team Scrubs,Dickies Scrubs, Skechers scrubs, Tooniforms, Zone Clogs,Skechers shoes and Avia.
maternity medical uniforms
cheap scrubs with free shipping
WOW.. This is what I’m waiting for the long…
Nice work
Could u let me know how can i import 2007 excel file
Is it possible to export an image to excel through as3xls?
Great summary of what it is really like – it’s not perfect, but with a little creativity and help from the employer – it is a great step to providing the best nutrition and protection to our children. I work as a lactation consultant in Northern California and many of the companies we work work are on board already. Its a short term commitment for a huge long term gain. Thanks for your post.
excellente bilhadiar de tambo y tucos con ditistamo camemo. orinho a lario y nônetos escremes con movoxu olard!
Thnx Nice work
Where can I find the source code for this application?
thats what i want.
thanks alott
This is great. Is there a way to also include the column titles, as a CSV file would do?