Fastest way to detect language in file

Let’s say if there 5 excels files, you want to check whether there is a japanese word in any of the files.

There are 300,000 lines per excel file. Each excel file contains words with many language, eg. English, Chinese.

What’s is the fastest way to check whether the excel file contains a word in Japanese for example.

Looking for experts here to give me some advice how to do it at the fastest way.

Do I need to split the file?

I using UiPath for each row, to check but it is too slow.


1 Like

Hi @Zenith

Use Directory.GetFiles(folderpath)

then use for each row in DtTable
row(“ColumnName”).ToString.Contins(“Japaneese word”)

ashwin S

It used that it is too slow


Read the Excel one by one by using Directory.GetFiles(FolderPath) 

Firstly, read the respective sheet by using “Read Range” Activity and store it in a datatable Variable as dt1.
Then Use OutputDatatable Activity and pass the readrange output (dt1) and store the output in a string variable as str1.
Finally Use If Condition check str1.Contains(“yourWord”) if it is true then it exists.

A string variable is enough to store 300k lines?

Hi @Zenith,
You can also try as below.


Hi @Zenith,

Here is the link to detect the language code and language name for the text.