Worksheet API... Set xlApp=Createobject("Excel.Application") set xlWorkBook=xlApp.workbooks.add set xlWorkSheet=xlWorkBook.WorkSheets.add 'Every where on net it is given .WorkSheet instead of .WorkSheets and failing ... take care ' Action we can perform on Worksheet like ...Few this you we can do xlWorkSheet.Range("A1:B10").interior.colorindex = 34 'Color outputWkbook.SaveAs testData,,pwd,writeresPwd 'Save outputWkbook.Close 'Used Range and FInd With objSheet.UsedRange ‘ select the used range in particular sheet Set c = .Find (“nn”)’ data to find For each c in objSheet.UsedRange’ Loop through the used range If c=”nn” then’ compare with the expected data c.Interior.ColorIndex = 40′ make the gary color if it finds the data End If Set c = .FindNext(c)’ next search 'Copy objWorkbook1.Worksheets(“Sheet1″).UsedRange.Copy 'Counting rowsCount=xlWorkSheet.Evaluate("COUNTA(A:A)") 'Will count the # of rows which have non blank value in the column A Worksheets (Worksheet) | |
Friday
QTP - Excel Worksheet Object Model
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment