我正在复制和插入Excel表格中的行,操作如下:
while (rowsToAdd > 0)
{
// copy the existing row
insertionCell.EntireRow.Copy(Type.Missing);
// location of the new row
Range newRow = insertionCell.EntireRow.get_Offset(1, 0).EntireRow;
// insert the new row
newRow.Insert(XlInsertShiftDirection.xlShiftDown, Type.Missing);
rowsToAdd--;
}
我的问题是有时候,我会在原来复制的行周围留下一个选择标记。
是否有一种方法可以取消选择标记(通常使用Escape键)?