2
이 질문은 중복 될 수 있지만 실제로 단어를 다른 단어로 쓰는 방법을 알지 못합니다.Excel Interop "FindAll"메서드
누구든지 "찾기 및 바꾸기"대화 상자에서 "모두 찾기"기능을 제공하는 Excel Interop Library에서 메소드를 찾을 수 있습니까?
Find, FindNext 및 FindPrevious가 있지만 FindAll은 홀수입니다.
지금까지, 이것은 내가 그 일을 해요 방법은에서 처음으로 찌르고 ... 말하자면,
//FindRange() is an extension method which wraps Worksheet.Cells.Find()
Range start = sheet.FindRange(searchText,
XlLookAt.xlPart,
XlSearchOrder.xlByColumns,
XlSearchDirection.xlNext);
HashSet<int> matches = new HashSet<int>();
Range next = start;
while (true)
{
next = sheet.Cells.FindNext(next.get_Offset(1, 0));
if (!matches.Add(next.Row))
break;
}
어떤 생각인가?