更新时间:2023-11-04 17:02:34
一旦你有了一个参照表说
Once you have a reference to the worksheet say
for(int i = 1; i <=100; i++)
{
if(!worksheet.Cells[i,1].Contains("SomeString"))
{
((Range)worksheet.Rows[i]).Delete(shiftDirection)
}
}
在这里shiftDirection在这里看到:Range.Delete方法
您可能不得不投Cell的内容为一个字符串。
You may have to cast the Cell's content to a string.