텍스트 중복 인식 해결방법

안녕하세요.
엑셀에 있는 데이터 중 데이터 테이블 액티비티 필터를 사용해서 “1월1주” 에 포함된 값만 불러와서 검색창에 넣는 로직을 사용중인데요,
“1월1주” 를 텍스트로 입력해서 결과값을 가져올때 기존 누적된 데이터에 “11월1주” 도 같이불러오네요, 1월1주 = 11월1주 같은 텍스트로 인식을 하는거 같은데 해결방법이 있을까요?

Hi @doosanhero6

Can you provide the excel if the data is not confidential.

Regards

1 Like

Hi @doosanhero6

Can you try the below

FilteredDataTable = YourDataTable.AsEnumerable().Where(Function(row) row.Field(Of String)("Week").Trim().Equals("January 1st week", StringComparison.OrdinalIgnoreCase)).CopyToDataTable()

1 Like

도와주셔서 감사합니다
그런데 어떻게 적용해야 할지 잘모르겠는데
예시 파일로 보여주실순 없을까요?

@doosanhero6

Can you please share excel file and expected output

1 Like

공개할수 있는 파일이 아니어서
샘플로 엑셀 파일과 예상 출력을 첨부해 보겠습니다.

Hi @doosanhero6

Str_Input= Your string you want to match in Datatable on that particular column.

YourDataTable.AsEnumerable().Where(Function(row) row.Field(Of String)(“YourColumnName”).Equals(“Str_Input”)).CopyToDataTable()

Happy Automation :slight_smile:

1 Like

test_sample.xaml (16.6 KB)
excel_sample.xlsx (9.4 KB)
테스트 파일 첨부했습니다.

1월1주= 입력시,
1월1주=11월1주 동일하게 인식하지 않고 1월1주만 인식했으면 좋겠습니다.

Hi @doosanhero6
=> Read Range Workbook
Output: dt(DataType: System.Data.DataTable)
Input:

=> Use the below syntax in Assign activity:

dt= dt.AsEnumerable().Where(Function(row) row.Field(Of String)("주차").Trim().Equals("1월1주", StringComparison.OrdinalIgnoreCase)).CopyToDataTable()

=> Write Range Workbook
Output:

Regards

1 Like

감사합니다 :slight_smile:
한번 응요해보겠습니다.
해결이 안될시 추가로 문의드려도 괜찮을까요?

Hi @doosanhero6

Yes if there is any issue you can connect with me.

Regards

1 Like

안녕하세요 @doosanhero6

요청주신 내용에 필터 데이터테이블 액티비티에 동작에 Contains 로 설정되어있어서 포함하고 있는 텍스트를 전부 가져와서 1월1주차를 원하지만 11월 1주차도 같이 나오는걸로 보이네요

= 이나 StartWith 또는 equal 같은 조건으로 라이크조건이 아닌 이퀄 조건을 주시면 원하는 텍스트만 발라낼 것 같네요

화이팅하세요~

기존대로 ‘1월1주’ 포함한 필터 액티비티 사용해서 가져온 이후에,
필터 액티비티 사용해서 ‘11월1주’ 데이터들을 제거하고 남은 데이터를 이용하는 방식은 어떨까 싶습니다