Solved

How to export an image to excel sheet using flex?

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
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 Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

687 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