Solved

How to export an image to excel sheet using flex?

Posted on 2010-09-22
7
1,069 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

708 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

12 Experts available now in Live!

Get 1:1 Help Now