Forum Discussion

AndreJos's avatar
AndreJos
New Contributor
12 years ago

Read UTF8 Cells from Excel file

Hi every one,



I'm currently trying to get informations from an excel file but some lines contains utf8 caracters and TestComplete don't interpret it, the result is for example ?????? ????? ??? instead of my cell value



My code is like :




  var myExcel= Sys.OleObject("Excel.Application");

  myExcel.Workbooks.Open(ProjectSuite.Path + "\\myExcelFile.xls");
 ...



var myLine = aqConvert.VarToStr(myExcel.Cells(i, j));



Somebody know how to get utf8 caracters from an excel file ? Like Russian words




2 Replies

  • AndreJos's avatar
    AndreJos
    New Contributor
    Hi,



    Thanx for your reply, but the file was already set to UTF8 encode,



    The problem was caused by the used of VarToStr(...) instead of aqConvert.VarToStr(...) on one line, my mystake!



    Problem solved