I have created an excel file and want to export its contents as a png or jpeg file.
Unfortunately the quality of the image is really low.
Is there a solution to this? I wish a really high resolution picture.
Thank you
My current code (from internet):
Excel.Range xlRange = xlWorksheet5.get_Range("A1", "K30");
xlRange.CopyPicture(Excel.XlPictureAppearance.xlScreen, Excel.XlCopyPictureFormat.xlPicture);
Excel.ChartObject chartObj;
chartObj = xlWorksheet5.ChartObjects().Add(xlRange.Left, xlRange.Top, xlRange.Width, xlRange.Height);
chartObj.Activate();
string path_image = path + "\\image.png";
Excel.Chart chart = chartObj.Chart;
chart.Paste();
chart.Export(path_image);