Solved

How to export an image to excel sheet using flex?

Posted on 2010-09-22
7
1,091 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

734 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