Solved

How to export an image to excel sheet using flex?

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

803 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