Free Support Forum - aspose.com

How to convert the excel file including only image files

I can't convert the excel file including only image file to image.

I attached the sample image file.

please check the image.

Hi,

I tested your scenario with my attached sample file (containing your provided image) and with our latest version/fix v4.9.1.6 using the following code, it works absolutely fine, the output images are rendered fine.
Sample code:

Workbook workbook = new Workbook();
workbook.Open(“e:\test\MyFilePic.xlsx”);
Worksheet worksheet = workbook.Worksheets[0];

ImageOrPrintOptions printoption = new ImageOrPrintOptions();
printoption.ImageFormat = ImageFormat.Emf;
SheetRender sr = new SheetRender(worksheet, printoption);
int sheetPageCount = sr.PageCount;
for (int j = 0; j < sheetPageCount; j++)
{
sr.ToImage(j, “e:\test\image” + j.ToString() + “.emf”);
}



Please try the attached version and let us know if it works fine now.