Active Topics Memberlist Calendar Search Help | |
Register Login |
One Stop Testing Forum : Testing Tools @ OneStopTesting : QuickTest Pro @ OneStopTesting |
Topic: VBScript to Delete a Particular row in an EXCELSHE |
|
Author | Message |
Mithi25
Senior Member Joined: 23Jun2009 Online Status: Offline Posts: 288 |
Topic: VBScript to Delete a Particular row in an EXCELSHE Posted: 25Nov2009 at 10:44pm |
We have Excelsheet with following values
A B C 11 lak QTP 22 lax LR 33 laxmi WR 44 lakshmi QC Set aa = CreateObject("Excel.Application") Set bb = aa.Workbooks.Open("C:\es.xls") Set cc = aa.worksheets("Sheet1") cc.Rows(1).Delete bb.Save aa.Workbooks.Close() Above script deletes first row of excelsheet. After running the script excelsheet will have following values. A B C 22 lax LR 33 laxmi WR 44 lakshmi QC Similarly to delete 3 row(just replace 1 with 3 in the above script). Set aa = CreateObject("Excel.Application") Set bb = aa.Workbooks.Open("C:\es.xls") Set cc = aa.worksheets("Sheet1") cc.Rows(3).Delete bb.Save aa.Workbooks.Close() |
|
Post Resume: Click here to Upload your Resume & Apply for Jobs |
|
IP Logged | |
Forum Jump |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
© Vyom Technosoft Pvt. Ltd. All Rights Reserved.