Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delete rows into data sheet
#1
Solved: 11 Years, 4 Months ago
I want to delete certain rows into my data sheet.

Some one can help please ?

Thanks.
Reply
#2
Solved: 11 Years, 4 Months ago
What do you mean by "into my data sheet", Am I reading it wrong or is it supposed to me "in my data sheet"?
Reply
#3
Solved: 11 Years, 4 Months ago
Yes exactly,
Deleting certain rows in my data sheet.
Reply
#4
Solved: 11 Years, 4 Months ago
Once again, I couldnt find a direct method, Here's a workaround though export datatable to excel sheet, open excel sheet and delete the required row. Import back the new datatable (or sheet or whatever).


Hope the below code helps!
********************************
Code:
datatable.ImportSheet "C:\Documents and Settings\jemuthyala\Desktop\F5ventures.xls","Chess","Chess"
'                        intcolumnCount = DataTable.GetSheet("Chess").getrowcount
'                        msgbox intcolumncount
'                        datatable.SetCurrentRow (2)
'                        Doc_Number= 2
'                        DataTable("Men_Singles",dtLocalSheet)= Doc_Number
datatable.exportSheet "C:\Documents and Settings\jemuthyala\Desktop\F5ventures.xls","Chess"
                         Set objExcel = CreateObject("Excel.Application")
                         Set objWorkbook = objExcel.Workbooks.Open("C:\Documents and Settings\jemuthyala\Desktop\F5ventures.xls")
                         objExcel.Visible = True
                          Set objWorksheets = objworkbook.sheets ("Chess")
                          objworksheets.select
                          objworksheets.rows (1).delete ' Insert logic to selcet rows that are to be deleted.
                        datatable.ImportSheet "C:\Documents and Settings\jemuthyala\Desktop\F5ventures.xls","Chess","Chess"
Reply
#5
Solved: 11 Years, 4 Months ago
Thanks for your help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Multiple rows of test data Bhuvana 0 1,341 01-03-2020, 09:30 PM
Last Post: Bhuvana
  Delete Firefox history and Cookies Anupama 0 1,437 06-18-2018, 11:57 AM
Last Post: Anupama
  Reading data from excel sheet serenediva 1 9,622 03-03-2017, 10:07 AM
Last Post: vinod123
Question QTP not performing iterations based on local data sheet Breaker 18 56,763 01-25-2016, 04:32 PM
Last Post: arunshuklainbox
  Importing data sheet Santu 2 3,396 08-20-2015, 11:37 PM
Last Post: ADITI1992

Forum Jump:


Users browsing this thread: 1 Guest(s)