Write in Excel - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others) +--- Thread: Write in Excel (/Thread-Write-in-Excel) |
RE: Write in Excel - Anu - 08-23-2010 Hi, Thanks for prompt reply................. Actually i have 84459 data and also it is not fixed. Depending on my query in the site it produces result......... So please correct in my code itself because if i use my code then the QTP runs fast. Regards, Anu RE: Write in Excel - venkatbatchu - 08-23-2010 Hi Anu, No issue with what count ithas like 844559 It will keep on fetching the records from web table to data table. Browser("xxxxxxxxxxxx').Page("xxxx").WebTable("xxxxxxxxx").GetRoproperty("rows") will fetch 844559 so you no need to worry how much count the only concern is if you more no of record then it will take more time to fetch all records to excel And thats the reason i have given somme logic to click "Next" link to fetch all the data. So first please try and let me know if you face any issues. Regards, Venkat.Batchu RE: Write in Excel - Anu - 08-23-2010 Hi, Your code is bit confising for me. Does it write the data to excel? Regards, Anu RE: Write in Excel - venkatbatchu - 08-23-2010 Ofcourse, Why do you worry about the code lets start implementing in this way. let me know for further clarification. Regards, Venkat.Batchu RE: Write in Excel - Anu - 08-23-2010 Hi, Below is the modified code........................... Code: Dim xlSheet,xlBook, xlApp,a,CustomerName,Address,datatable But it is throwing a syntax error while executing this "Datatable.AddParameter("CustonerName"),Global Sheet)" Regards, Anu RE: Write in Excel - venkatbatchu - 08-23-2010 Hi Anu, You dont need to create any objects like xlApp, xlBook,xlSheet. Code: Set xlApp = CreateObject("Excel.Application") Just delete all the objects related. Just execute it a i provided and debug this. Please let me know for further clarification. Regards, Venkat.Batchu RE: Write in Excel - Anu - 08-23-2010 Hi, As per your previous reply, i had removed the excel object but still sytax error is coming.............. Please find the attached screen shot. RE: Write in Excel - venkatbatchu - 08-23-2010 Hi, Use the syntax as like below Code: Datatable.AddParameter("CustomerName","") Then it will work. Regards, Venkat.Batchu RE: Write in Excel - Anu - 08-23-2010 Hi, I have done the modification as per your previous mail but still it is giving error. Could you please tell me in which datatable the data should be added? Quite Confusing RE: Write in Excel - venkatbatchu - 08-23-2010 Hi Anu, You are facing small errors as you were posting i.e it was telling remove the paranthesis.You should have try this befre posting. Code: Datatable.AddParameter "Name","" With this you can see the two coloumns of "Name" and "Address" in Global Sheet. Please try and let me know if you need any clarification on this. Regards, Venkat.Batchu |