GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Testing Tools  >  QTP

 Print  |  
Question:  Copy Datatable Content

Answer: How to copy a datatable content from globalsheet to localsheet (action1)?


June 06, 2009 06:12:57 #2
 Satish_kunchi   Member Since: June 2009    Total Comments: 1 

RE: Copy Datatable Content
 
You can use the ExportSheet property of the DataTable.

The syntax is as follows :


DataTable.ExportSheet "<Path of the Local excel sheet>" ,"<Global Sheet name>".

For ex:

I have added data to the Datatable in the sheet with the name 'Sheet_001' and then exported that into a local sheet.

DataTable.AddSheet ("Sheet_001").AddParameter  "OrderNumber", ORN
DataTable.ExportSheet "D:OrderDetails.xls" ,"Sheet_001".
     

 

Back To Question