FileSystemObject supports TextFile format only?

Hi there,


In testpartner, "FileSystemObject" to read file is applicable in case of text file format only?

Is there any different command/properties to read other file format in testpartner (not silk test) like rtf, xls format?

Otherwise I need to "save as" other format file into txt and then it can read in testpartner with OpenTextFile property  Hmm

Thanks,

  • Verified Answer

    Maggie,

    I store testdata in Excel spreadsheets.

    I use the ActiveData asset setup in TestPartner to identify the Path to the spreadsheet and then use TestPartner supplied methods to access the testdata.

    Below is some sample code  which may help .

      ' Get the row of TestData from the spreadsheet testdata

      ' -----------------------------------------------------

       Dim myData_Row As TActiveDataRow

       Dim myData As TActiveData

       Set myData = Nothing

       Set myData = LoadActiveData("Patients") ' Patients is the name of the Active Data asset

       ' Read thru Patients looking for the row

       ' ----------------------------------

       Dim strPatientData as string

       For Each myData_Row In myData

         strPatientData  = myData_Row.GetString("Patient First Name") ' this is the column heading

       Next

  • Thanks Martin. I will try this solution. But before this, Can you please confirm, if it requires any office or XLS installed on PC. I am looking for solution where office/XLS installation will not be there.

    Thanks.

  • Thanks Martin. I will try this solution. But before this, Can you please confirm, if it requires any office or XLS installed on PC. I am looking for solution where office/XLS installation will not be there.

    Thanks.

  • Thanks Martin. I will try this solution. But before this, Can you please confirm, if it requires any office or XLS installed on PC. I am looking for solution where office/XLS installation will not be there.

    Thanks.

  • Verified Answer

    Maggie,

    ActiveData does not require Excel to be installed on the PC. If Excel isn't installed and you have an ActiveData asset that is using an XLS file, you can only read data from the file - ActiveData will not be able to make changes to it. If you want to change an XLS file with ActiveData, Excel will need to  be installed on the PC.

    CSV/Text files are always read/write when used with ActiveData.

    Andy

  • Verified Answer

    Maggie,

    ActiveData does not require Excel to be installed on the PC. If Excel isn't installed and you have an ActiveData asset that is using an XLS file, you can only read data from the file - ActiveData will not be able to make changes to it. If you want to change an XLS file with ActiveData, Excel will need to  be installed on the PC.

    CSV/Text files are always read/write when used with ActiveData.

    Andy

  • Thanks Andy and Martin..This solution is working and I am trying with my code. Really appreciate for your help :)