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 - 05-26-2010 Hi Saket, I have removed the read only preoperty even though it is creating problem. On navigating to the next link it shows the below error. Please help me M eargly waiting for your reply............. Regards, Anu RE: Write in Excel - Saket - 05-26-2010 add property 'DisplayAlerts' as false for excel Code: xlApp.DisplayAlerts = False RE: Write in Excel - Anu - 05-26-2010 Hi Saket, I had tried the code given by you but it is not working in my code. Same above two errors are coming whose screen shot i attached previously in my reply. Regards, Anu RE: Write in Excel - Saket - 05-26-2010 did you try using 'saveas' for 'save'? does it also not work? I just tried it with both the options, it works perfect. It should work at your side as well. I am out of options now, except one thing that I suspect is you are running this script everytime the new link clicked bcoz I dont see any kind of loop there to go through all the links and fetch data. In that case if you dont quit from excel you may receive the read only error. let me know how it is there. RE: Write in Excel - Anu - 05-26-2010 Hi Saket, On using savesas, it is also showin the error message. Yes u r absolutely true. I am running the script evertime the new link is clicked. Please find the screen shot of both the scenarios mentioned here. First for 'saveas'. Second 'my web page on which i am using QTP' Regards, Anu RE: Write in Excel - Saket - 05-26-2010 quit from excel on every run xlApp.quit and set Nothing for all object created RE: Write in Excel - Anu - 05-26-2010 Hi Saket, Now it is working Thanks a lot for yours co-operation. Regards, Anu RE: Write in Excel - Saket - 05-26-2010 Ah Finally , great to know that its working. RE: Write in Excel - Anu - 08-23-2010 Hi Saket, Again i am facing problem in writting data to excel.The code is mentioned below : Code: Dim xlSheet,xlBook, xlApp,a,CustomerName,Address,datatable Regards, Anu RE: Write in Excel - venkatbatchu - 08-23-2010 Hi, Instead of using Excel obects you could go with data tables. Lets assume that 1000 records are available on web page. 'if all the rows are displaying in sngle page (all the records) (Ex: 1000 records in single page) Code: 'To add the column names "Name","Address" for the data table. If 1000 records are displaying in 50 pages i.e 20 records in one page (20 *50) Code: 'To add the column names "Name","Address" for the data table. With the above code we could export the data which is available in Web table simply we can say data export from web table to data table and finally exporting to required path. Please let me know for further clarification. Thanks and Reagrds, Venkat.Batchu |