How to save test results in Xls sheet or an notepad?

Questions by anusiva

Showing Answers 1 - 3 of 3 Answers

you can save the results using the below mentioned funciton:


RowsCount=RowsCount-1
                   
End If
                  

 If RowsCount =i Then
                      
 Exit for
                   
End If
         
Next
       
         
ColumnsCount = objWorkSheet.UsedRange.Columns.Count
         
 RowsCount =  objWorkSheet.UsedRange.Rows.Count
        
        
For icount=1  to ColumnsCount
                
getval =   objWorkSheet.Cells(1,icount)
               
 getval = Trim(getval)
           

If  (getval)  =  (keyword)  Then
                   
 icounter = icount
                   
Exit For
           
End If
         
Next
  

'           Set objRange = objWorksheet.UsedRange
'         
 objRange.SpecialCells(xlCellTypeLastCell).Activate
'          
intNewRow = objExcel.ActiveCell.Row 
    
          
getvar =  objWorkSheet.Cells(RowsCount,icounter)
          
intNewRow = RowsCount
         
 If  getvar = ""   Then
                    
                 
 objWorkSheet.Cells(intNewRow ,icounter) =  actual
                
  objWorkSheet.Cells(intNewRow ,icounter).Font.Size = 8
              
    objWorkSheet.Cells(intNewRow ,icounter).HorizontalAlignment = 4
              
    objWorkSheet.Cells(intNewRow ,icounter).WrapText = True
           
       objWorkSheet.Cells(intNewRow,icounter).ShrinkToFit =True
               
   objExcel.Cells(intNewRow,icounter).Interior.Colorindex = 36
   
       Else          
             
objWorkSheet.Cells(intNewRow +1 ,icounter) = actual
        
objWorkSheet.Cells(intNewRow +1 ,icounter).Font.Size = 8
             
objWorkSheet.Cells(intNewRow + 1 ,icounter).HorizontalAlignment = 4
    
objWorkSheet.Cells(intNewRow  +1,icounter).WrapText = True
          
objWorkSheet.Cells(intNewRow +1 ,icounter).ShrinkToFit =True
   
objExcel.Cells(intNewRow +1 ,icounter).Interior.Colorindex = 36
           
End If      
        
objExcel.ActiveWorkbook.Save
        
objExcel.ActiveWorkbook.Close
        
objExcel.Application.Quit
         
Set objWorksheet =Nothing
        
Set objExcel = Nothing


End  Sub

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions