Hi dof,
已解决此问题,加多句 fpSpreadSAM.ActiveSheet.ClipboardPaste(FarPoint.Win.Spread.ClipboardCopyOptions.Formulas) 即可. 将清除的 Formulas 填回. 以下为完成的代码.
Thanks!
'设定可复制表头
fpSpreadSAM.ClipboardOptions = ClipboardOptions.ColumnHeaders
fpSpreadSAM.ActiveSheet.SelectionUnit = SelectionUnit.Column
fpSpreadSAM.ActiveSheet.ClearSelection()
fpSpreadSAM.ActiveSheet.AddSelection(0, 5, 101, 6)
fpSpreadSAM.ActiveSheet.ClipboardCopy()
fpSpreadSAM.ActiveSheet.ClearSelection()
fpSpreadSAM.ActiveSheet.AddSelection(0, 23, 101, 6)
fpSpreadSAM.ActiveSheet.ClipboardPaste()
fpSpreadSAM.ActiveSheet.ClearRange(0, 23, 101, 6, True)
fpSpreadSAM.ActiveSheet.ClipboardPaste(FarPoint.Win.Spread.ClipboardCopyOptions.Formulas) '只复制方程式
fpSpreadSAM.ActiveSheet.ClearSelection()
fpSpreadSAM.ActiveSheet.SelectionUnit = SelectionUnit.Cell
'设定回不可复制表头
fpSpreadSAM.ClipboardOptions = ClipboardOptions.NoHeaders |