次のように、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--;
}
私が抱えている問題は、最初にコピーした行の周りに選択マーキーが残ることがあるということです。
選択マーキーをキャンセルする方法はありますか(通常、エスケープキーを使用してキャンセルする方法はありますか?)