I'm having trouble getting my range exported to an emf file. It does get copied to the clipboard because I can paste it after the exception is thrown. Here's my code:
if (intersectRange != null && name.RefersToRange.Cells.Count > 1)
{
name.RefersToRange.CopyPicture(Excel.XlPictureAppearance.xlScreen, Excel.XlCopyPictureFormat.xlPicture);
Image img = Clipboard.GetImage();
img.Save(@"C:\Users\Nick\AppData\Local\Temp\Narrative1\N1Appraisal\ExcelTables\testtable.emf");
}
I've looked into DataObject() as well for the Clipboard but to no avail. I don't want to use the Chart method, it'll be too slow.
Aucun commentaire:
Enregistrer un commentaire