Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to append date to xls file using qtp datatable methods?
#1
Not Solved
append date to xls file using qtp datatable methods?

I'm working on UFT datatable methods and i'm exporting test results to xls file with the help of Datatable exportsheet methods and i want to add test execution time and date end of the xls file and my code is.



Code:
'Export Test Results into TestResults Folder with Test Cases
DataTable.ExportSheet "D:\QTP_Automation\Test_Results_AutomationTesting_Results.xls","TestCases"
DataTable.ExportSheet "D:\QTP_Automation\Test_Results_AutomationTesting_Results.xls","TestSteps"
DataTable.ExportSheet "D:\QTP_Automation\Test_Results_AutomationTesting_Results.xls","Customer_Enrollment"
DataTable.ExportSheet "D:\QTP_Automation\Test_Results_AutomationTesting_Results.xls","Update_Customer"
And my file should looks like below

Test_Results_AutomationTesting_Results_20180430_timestamp.xls
Reply
#2
Not Solved
Are you facing issues in capturing current date and time from your machine? 

If yes, check the date and time functions available in VBA. Simply capture them in a variable and put them in your sheet.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Invalid file error importing xls file Makhado 0 1,185 10-04-2018, 04:33 PM
Last Post: Makhado
  QTP not recognizing date calendar kQTPs 1 3,446 12-20-2017, 11:21 PM
Last Post: harikrishna
  The DataTable.ExportSheet operation failed. Invalid file. Niraj 2 5,973 05-05-2015, 11:40 PM
Last Post: babu123
  QTP11.0 - Date format is changed as text while executing the QTP script. Automation Tester 1 3,907 05-30-2014, 01:25 PM
Last Post: Tarik Sheth
  Retrieving data from Txt file into datatable kriday 3 5,529 07-23-2013, 11:04 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)