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

Free Support Forum - aspose.com

Range export to Image

I am in the process of evaluating Cells and Words and I have a need to export a range to an image for later import into Word. I am working with .net and C#, VS2013.

I need the image to be sized in a specific way. For example, 6"x6" at 300dpi

I have tried the following code :

sheet.PageSetup.PrintArea = "A1:CH41";ImageOrPrintOptions options = new ImageOrPrintOptions();

options.OnePagePerSheet = true;

options.VerticalResolution = 300;

options.HorizontalResolution = 300;

options.ImageFormat = System.Drawing.Imaging.ImageFormat.Png;ImageFormat.Png;

This certainly gives me an image but it is 14" by 30" image so I have to resize.

What I can't find is a property to set an explicit size for width and height so that I can set width as, for example, "width = 6.0 * dpi".

Any suggestions?

Hi Rob,

Thanks for your posting and using Aspose.Cells.

In order to export range of cells in a worksheet to image, please see the following documentation article for your reference.


Once, you have got your image, you can resize it using Aspose.Imaging, please see the following documentation article for your reference.


I don't think buying another $1000 product just to set the dimensions of an exported Cells image is a viable option.

If Cells is not currently able to export sized images, please could you consider adding this in a future release?

Hi Rob,

Thanks for your posting and using Aspose.Cells.

Imaging resizing can also be done with .NET framework, please research on internet how to achieve it using .NET framework class library.

Actually, this feature is not related to Excel, so Aspose.Cells will probably not support it. However, we will investigate your feature request and see if such a feature could be supported in future versions.

Hi Shakeel,

I'd rather not resize anything. The result is invariably compromised quality with respect to an image rendered in the desired resolution and size. That is why I'd like to export to the correct size in the first place.

Part of the reason for my question is that I use other packages (Nevron Vision for example) whose export to image commands have parameters for both resolution and size. Precise export is something I have come to expect in a professional package.

Perhaps an easy workaround for Cells would be the option to define custom paper sizes.

best regards

Rob

Hi Rob,

Thanks for using Aspose.Cells.

Please explain your issue with more detail. So that we could investigate this issue more closely and see if such a feature could be implemented in our next versions.

Please just post one issue only and explain it in detail. If you have other issues too, then please create separate threads for it.