更新时间:2023-11-27 18:28:28
如果只想复制内容,则不能使用 Copy()
Range 对象(特别是 Cells
集合)的 方法:
If you just want to copy the content you can't use the Copy()
method of the Worksheet
object. Use the Copy()
method of the Range
object (specifically the Cells
collection):
$wb_source.Sheets.Item($SourceSheet).Cells.Copy()
$wb_target.Sheets.Item($TargetSheet).Cells.PasteSpecial(-4163)