问题描述
stringfileName=@"F:test.xlsx";Microsoft.Office.Interop.Excel.ApplicationmyExcel=newMicrosoft.Office.Interop.Excel.Application();objectoMiss=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.WorkbookmyBook=myExcel.Workbooks[1];Microsoft.Office.Interop.Excel.WorksheetmySheet=(Microsoft.Office.Interop.Excel.WorksheetmyBook.Worksheets[1];Microsoft.Office.Interop.Excel.RangemyRange=(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");这个是我自己在网上查到的,不行!我还在试用期阿,泣求解答.