We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to get graph in excel to word document

Hi

How to get Excel sheet graph object to word document.

I have graphs, which are generated by values entered in excel itself.

Now I want send that graph to word document.

How can I do that?

Thanks

Madhu

Hi

Thanks for your inquiry. I already answered this question here:
http://www.aspose.com/community/forums/143806/how-to-draw-graphs-in-a-word-using-excel-data/showthread.aspx#143806

Best regards.

Hi alexey,

I do not want to maintin the links(if I wrote the above code the word document is creatings a link for that one ). Since aspose is not supporting to break the links by retaining the data over there.

So I need to place the object as it is on word document(Without links).

Can you help me?

I think it will happen like the following

DocumentBuilder builder = new DocumentBuilder(doc);
com.aspose.cells.Charts shapes = worksheet.getCharts();
for(int z=0; z<shapes.size(); z++)
{
com.aspose.cells.Chart shape = (Chart)shapes.getChart(z);

if(shape!=null)
{
builder.insertImage(shape.toString());
}
}

But, I struk out in the bold line. I do not know how to write the shape to builder object.

I am sure that the shape is coming.

Help me out...

Thanks

madhu

Hi

Thanks for your inquiry. Unfortunately you can insert embedded OLE objects into the document using Aspose.Words. You can try inserting chart as image. I think you should consult with Aspose.Cells team how to convert chart to image.

In .NET version of Aspose.Cells there is method ToImage. So I can convert 2D charts to Bitmap and then insert into the document.

//Convert Chart to Bitmap. Now only supports to convert 2D chart to image. If the chart is 3D chart,return null.

Bitmap chartPicture = excelChart.ToImage();

But I can’t find the same in java version of Aspose.Cells.

Best regards.

Hi Alexey,

Thanks for your reply.

But, there is no such method excelChart.ToImage(); in the java.

Is there any other way to solve this porblem or else to whom I have to contact.

Thanks

Madhu

Hi

Thanks for your inquiry. I think you should consult with Aspose.Cells team. Maybe there is other way to convert Chart to image.

Best regards.