views:

201

answers:

3

I've got a series of Excel spreadsheets, each with at least one page of data and one page of a chart created from the data. I need to capture ( not regenerate from the data ) the existing chart as a web friendly image. Is this possible via Java or .Net? I know the POI stuff (Java) won't do it (or so I'm told, haven't tried it myself).

A: 

Chart images are not stored in workbooks, so you need a component which can render Excel compatible charts.

SpreadsheetGear for .NET will let you load Excel workbooks, optionally plug in new values / formulas / formats / etc..., calculate, and then get an image from a range of cells or from a chart.

You can see some samples here and download the free trial here if you want to try it yourself.

Disclaimer: I own SpreadsheetGear LLC

Joe Erickson
+2  A: 

Have you tried using the Chart.Export Method?

The example in help is:

Worksheets("Sheet1").ChartObjects(1).Chart. Export _
FileName:="current_sales.gif", FilterName:="GIF"

From memory, I think you can export to PNG as well.

Nick
A: 

For java,You can try SmartXLS for Java to export Excel chart to images,it can render Excel charts in java.

liya