帖一部分代码
Excel.Range Destination = worksheet.get_Range(worksheet.Cells[fstRow + 1, 1], worksheet.Cells[fstRow + maxRowCount, worksheet.UsedRange.Columns.Count]);
range.Copy(Type.Missing);
Destination.PasteSpecial(XlPasteType.xlPasteAll, XlPasteSpecialOperation.xlPasteSpecialOperationAdd, false, false);
从一篇博客上找到了解决方法(参看地址 http://www.pcreview.co.uk/forums/copy-range-values-c-t3763377.html)
/* Begin code snippet */
String strTopSourceCell = "A2", strBottomSourceCell = "A46";
String strTopDestinationCell = "F16", strBottomDestinationCell = "F60";
Excel.Worksheet activeWorksheet =
(Excel.Worksheet)Globals.ThisAddIn.Application.ActiveSheet;
Excel.Range exrSource = activeWorksheet.get_Range(strTopSourceCell,
strBottomSourceCell);
Excel.Range exrDestination =
activeWorksheet.get_Range(strTopDestinationCell, strBottomDestinationCell);
exrSource.Copy(Type.Missing);
exrDestination.PasteSpecial(Microsoft.Office.Interop.Excel.XlPasteType.xlPas
teFormulas,
Microsoft.Office.Interop.Excel.XlPasteSpecialOperation.xlPasteSpecialOperati
onNone,
false,
false);
百度了很久 ,没有了找到解决方法,在谷歌上找到了。