Solved

How to export an image to excel sheet using flex?

Posted on 2010-09-22
7
1,072 Views
Last Modified: 2012-05-10
Hi

                    How can I export a pie chart to excel sheet using Adobe flex.

Thanks
Puneet
0
Comment
Question by:PuneetKSaxena
7 Comments
 
LVL 11

Expert Comment

by:ProfessorBindokas
ID: 33751644
Hi

This is addressed by Adobe on their info/forum pages at http://forums.adobe.com/thread/207282?tstart=-1

A link to the tool is included.
0
 

Author Comment

by:PuneetKSaxena
ID: 33767178
Hi,
                  Thanks for the response.
The link above states how to export a datagrid to a excel sheet whereas I would like to know how to export a chart viz pie chart or a bar chart to excel sheet. I am able to export it to a pdf file but not to excel.

Regards
Puneet
0
 
LVL 14

Accepted Solution

by:
tomaugerdotcom earned 500 total points
ID: 33832128
Wouldn't you export the datagrid to Excel and then use Excel to create the pie chart or bar graph?

You won't be able to export the graphic to Excel and have it do anything other than just sit there - ie: it wouldn't be tied to any of the data, it would be completely static. If that's all you want - is Excel really the right place for this image?

However, I'm going to assume you have your reasons for wanting a static image in Excel. Unfortunately the process is not straightforward if you're dealing with FlashFlex, since there's no direct way to save a BitmapData object directly to your hard drive so you can import it into Excel. It must be done server side.

1. Serialize the bitmapData as a common file format (eg: PNG)
2. convert this to string format
3. send to server
4. deserialize and save the PNG file

Optionally, if your server side (PHP / Perl / Ruby etc) has an Excel parser library you might even be able to generate the Excel file and embed the image in it. That falls outside the scope of this Expert Zone however.

Here's a couple links for you to explore:
http://knol.google.com/k/louai-munajim/flash-saving-image-actionscript3/2ravws0j1sddw/2#
http://www.onegiantmedia.com/image---as3---bitmapdata---jpg---php---server--hard-drive

If your application is AIR, then you have access to the local filesystem and you can then save it to your local hard drive.
http://www.ghostwire.com/blog/archives/as3-serializing-bitmaps-storing-bitmapdata-as-raw-binarybytearray/

Of course, if you are doing this all locally, manually, why not just take a screen snapshot, and then import the image manually into Excel?

Hope something in this is of some use to you.

T


0
 
LVL 24

Expert Comment

by:broomee9
ID: 34078381
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now