【发布时间】:2012-09-12 01:45:28
【问题描述】:
我在 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 键的方式?)
【问题讨论】:
标签: c# excel interop excel-interop