Support,
I am using spire.office evaluation version and I am trying to open an existing excel convert the specific range of cells to Image. But the text in the image is very blurry and of low resolution. I tried to follow the steps in the below link e-iceblue.com/Tutorials/Spire.XLS/Spire.XLS-Program-Guide/Conversion/Convert-Excel-Sheet-to-a-High-Resolution-Image-in-C-VB.NET.html . However, the resolution has not been improved and with the proposed solution the image is showing up on complete white background . I am trying to achieve an image of good quality also the image should look like copy picture from excel and pasting it as PNG. Please advise.
Below is my code:
//actual code for PNG
ws = workBook.Worksheets["sheet1"];
ws.SaveToImage(tempFolder+"test.png",1, 6, 26, 12);
//suggested code in the link
MemoryStream ms = new MemoryStream();
ws.ToEMFStream(ms, 1, 1, 26, 12);
Image image = Image.FromStream(ms);
Bitmap images = ResetResolution(image as Metafile, 300);
images .Save(tempFolder + "sheet1", ImageFormat.Png);