How to convert excel chart to vector image

Is there any way to convert excel charts to vector images. As i tried all imageorprint options but still image is not received in vetor format.



Hi,

Thanks for your posting and using Aspose.Cells for Java.

You can convert your chart into EMF image format using the following code.

Java


String filePath = “F:\Shak-Data-RW\Downloads\source.xlsx”;


Workbook workbook = new Workbook(filePath);


Worksheet worksheet = workbook.getWorksheets().get(0);


Chart chart = worksheet.getCharts().get(0);


ImageOrPrintOptions opts = new ImageOrPrintOptions();

opts.setImageFormat(ImageFormat.getEmf());


chart.toImage(filePath + “.out.emf”, opts);



Hi,

Thanks for quick response. I got emf image but this is not high quality image on zoom this image is not clear. I want my chart in image format and on zoom I want to see the actual data but in this case after zoom data is unclear.

Hi,

Thanks for quick response. I got emf image but this is not high quality image on zoom this image is not clear. I want my chart in image format and on zoom I want to see the actual data but in this case after zoom data is not clear.

Hi,

Thanks for your posting and using Aspose.Cells for Java.

Please download and use the latest version Aspose.Cells
for Java v7.5.3.2
it works fine. We have attached the output emf image for your reference. If you zoom it, the quality does not get distorted.

If you still have a problem, then please provide your source file. We will look into it and update you asap.

Hi,

thanks for the response . but still qulity of image distorted after zoom. To get to know that image quality is distorted or not convert excel file to pdf and then zoom to miximum extend and then compare.
So is there is any possiblity to get that quality of image??

Hi,

Thanks for your posting and using Aspose.Cells.

We were not able to observe this issue. We have converted the source workbook into pdf and the chart image does not get distorted after zoom in the Adobe Acrobat Reader. We have attached the source file and output pdf for your reference.

If you still find an issue, please provide your source file and highlight your issue with red circles in screenshot. We will look into it and update you asap.

Hi,


My concern is that the emf image is not quality image. on zoom it get distorted.

I convert xls to pdf in that on extened zoom the chart is clear there is not distortion. But when i convert chart as an emf file it is not that much clear that it is in pdf file.

Now hope you understand my problem.

Hi,

Thanks for your posting and using Aspose.Cells.

We converted the sample file in to emf or pdf and did not notice any distortion while zooming it.
If you find any problem, then please provide us your source file which you are converting to emf image. We will look into it and help you asap.