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

Free Support Forum - aspose.com

Functionality Question - Excel range of cells to image

I am researching a product to help with a challenging user requirement and I would like to see if the Aspose products would be able to do this. Here is a description of what I need to do:

For a specified range of cells on a specifed sheet within an Excel document, I basically need to get an image capture of the data in excel and bring the image into an existing .NET application for display purposes. The .NET application is an in-house reporting system. The users want to incorporate live snapshots of data from those Excel files into the reporting system and the data will be refreshed at each run of the report. I envision that "refresh" being getting a fresh image from the Excel file at report run-time. It basically needs to be like a screenshot of the Excel data, maintaining the absolute identical formatting from the Excel file. However, it all needs to be automated and run server side- we cannot open Excel or even have Excel installed on the server.

An image output is very ideal. However, a PDF would be acceptable if image is not possible. The key is it needs to work just a specificed range of cells in a specified worksheet of the Excel file.

Is this possible with this product?


Thanks for your inquiry.

Yes, we support both Sheet2Image and Xls2Pdf features, please check the documentation topics for your reference:



Thank you.

Thanks for the quick response. This is an excellent start. But instead of an entire sheet to image is there a way to do just a range of cells from a sheet to an image?


Yes, I think you may try to set your printable area for your range in the sheet before taking the image.


Workbook wb = new Workbook();
wb.Worksheets[0].PageSetup.PrintArea = "A1:E30";

Bitmap bitmap = wb.Worksheets[0].SheetToImage();
bitmap.Save(@"f:\test\imgSheet.png", System.Drawing.Imaging.ImageFormat.Png);
Thank you.

Excellent! Thank you. I will download the trial and give it a shot. I appreciate your quick responses.