Forum Discussion

narender_1's avatar
narender_1
Contributor
12 years ago

Does test complete supports CSV file and odsfile for data driven test

Hi,

 Regarding DataDriven test:-

1) For .xlsfile object("Excel.Application"),  but Iam using .CSV file for test data how to use connection string for this?

2) Iam using Open office  and saved my excel file as .xls, but while Iam executing Iam facing with this error (ActveX object can't create object: Excel.Application).



Please let me know how to overcome from this.



Thanks in Advance,

Narender.

3 Replies

  • anilcharan's avatar
    anilcharan
    Occasional Contributor
    Hi Narender,



        Regarding DataDriven test:-

        2) Iam using Open office  and saved my excel file as .xls, but while Iam executing Iam facing with this error (ActveX object can't create object: Excel.Application).





    For the above issue, you need to install "MicroSoft Excel 2007" and now you can use those open office excels same as earlier(.xls extension only). While executing, you wont face that error again.





    Regards,

    Anil.
  • ArtemS's avatar
    ArtemS
    SmartBear Alumni (Retired)

    Hi Narender,





    >>1) For .xlsfile object("Excel.Application"),  but Iam using .CSV file for test data how to use connection string for this?





    TestComplete supports CSV files for data driven tests. To connect to a CSV file, use the DDT.CSVDriver(FileName) method. See Using CSV Files as Data Storages for details.





    >>2) Iam using Open office  and saved my excel file as .xls, but while Iam executing Iam facing with this error (ActveX object can't create object: Excel.Application).





    Anil is right. To read data from .xls files, Microsoft Excel should be installed on the computer. Unfortunately, Open Office does not provide the underlying programming components which are required by TestComplete. 

    Therefore, to use input data prepared in Open Office, you need to save it to the CSV format and then read it from TestComplete via the DDT.CSVDriver method.





    Regards
  • anilcharan's avatar
    anilcharan
    Occasional Contributor
    Hi,



        Thanks Artem, the connection to CSV file is correct. We can use this DDT.CSV Driver Method and it works fine.





    Regards,

    Anil.