如何从Excel 读取图片,高难度阿
string fileName = @"F:\test.xlsx";
Microsoft.Office.Interop.Excel.Application myExcel = newMicrosoft.Office.Interop.Excel.Application();
object oMiss = System.Reflection.Missing.Value;
myExcel.Application.Workbooks.Open(fileName, oMiss, oMiss, oMiss, oMiss, oMiss, oMiss, oMiss, oMiss, oMiss, oMiss, oMiss, oMiss, oMiss, oMiss);
Microsoft.Office.Interop.Excel.Workbook myBook = myExcel.Workbooks[1];
Microsoft.Office.Interop.Excel.Worksheet mySheet = (Microsoft.Office.Interop.Excel.WorksheetmyBook.Worksheets[1];
Microsoft.Office.Interop.Excel.Range myRange = (Microsoft.Office.Interop.Excel.Range)mySheet.Cells[2,1];
myRange.Select();
myRange.CopyPicture(XlPictureAppearance.xlScreen, XlCopyPictureFormat.xlBitmap);
if (System.Windows.Forms.Clipboard.ContainsImage())
System.Windows.Forms.Clipboard.GetImage().Save(@"F:\abc.jpg");
这个是我自己在网上查到的,不行!我还在试用期阿,泣求解答.