Forum Discussion

Krishna_Kumar's avatar
Krishna_Kumar
Contributor
5 years ago
Solved

Export Data Table values to External File

Hi Team,

 

i wanted to export the data table values to an external CSV file or excel file programatically after each and every execution. im using vbscript.

can anyone help me on this ?

 

Kind Regards,

Sathish Kumar K

  • tristaanogre's avatar
    tristaanogre
    5 years ago

    A table variable has two properties/methods: ColumnCount and ColumnName.  ColumnName has a parameter for the index of the column, 0 based.  So Project.Variables.tableVar.ColumnName(0) will return the column name of the first column in the table.  Using ColumnCount, you could build a for-loop to iterate through the columns and document the names.

7 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    By data table values, what do you mean?  Is this a Table type variable in Project.Variables?

     

    If so, you can write an iterative for-loop using the table count as the index and use aqFile object to opena and write to a CSV file the values in the table.