Forum Discussion

hskim's avatar
hskim
Contributor
9 years ago

Execute issue of file path.

Hi,

I have a problem when using Testcomplete in Web module.

 

Refer the attached file, that has file path, "C:\CHID_Value.xlsx".

But when I execute a testcase, alert is same the attached picture(errorlog.PNG).

file_path.png

-------------------------

Microsoft Excel cannot access the file 'C:\8DAA4000'. There are several possible reason;

------------------------

errorlog.PNG

I no have the path in my PC.

I don't know why the path is displayed, 8DAA4000

 

Please let me know.

Thanks.

 

 

4 Replies

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    In JScript, you need to double the backslashes in strings:

     

    var fileName = "C:\\CHID_Value.xlsx";
    • hskim's avatar
      hskim
      Contributor

      Thank you.

      I recently know the backslashes must be twice.

      But it's not reason with my question.

       

      I don't know why is that.

      But the issue is resolved that executing by admin mode.

       

      Thanks everyone.

      Have a good day~

  • baxatob's avatar
    baxatob
    Community Hero

    Hi,

     

    You catch an error in Line 21 of your code. What is there? And what function WriteExcelSheet() should do?

    • hskim's avatar
      hskim
      Contributor

      Yes right.

      I exeport the result to excel.

       

      Thanks