Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to verify data in excel sheet dowloaded from web appln
#1
Solved: 10 Years, 8 Months, 4 Weeks ago
Hi,

Can anyone suggest solution for the below scenario?
Below is the scenario:

From a web application, we have to check the export to excel functionality.
Ex, there is a data grid with lot many records (rows).
We have to export the data by clicking on Export to Excel button
Click on Open button in File Dowload window
Open the Excel sheet (without saving)
Verify the total record count in excel sheet matches with the count displayed in application.
When tried to add objects for the excel sheet which is open... later OR is not identifying the same excel sheet. How can we add the Excel sheet as an object uniquely?

Thanks,
Ravi.
Reply
#2
Solved: 10 Years, 8 Months, 4 Weeks ago

Hi Ravi,

Does the imported excel workbook gets opened after the import operation? If so, I guess u can make the QTP identify the opened excel book by Descriptive programming. If the excel workbook does not get opened physically and the excel.exe runs in hidden mode, I think u can access the same using CreateObject("Excel.Application").

Please let me know if I am wrong.

Regards,

Sravanthi
Reply
#3
Solved: 10 Years, 8 Months, 4 Weeks ago
Hi,

Found solution for my query. Used below code to retreive the row count from an open application:

Code:
Set objExcel = Createobject("Excel.Application")
Do
     Wait(2)
Loop Until objExcel.Visible = True
rowCount = objExcel.ActiveWorkbook.ActiveSheet.usedrange.rows.count

Thanks,
Ravi.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Want to read the data from excel and set read value in the JavaTable rajeevk7 0 2,161 07-10-2017, 04:20 PM
Last Post: rajeevk7
  dtLocalSheet empty even though excel file contains data cantorre 2 2,202 05-10-2017, 12:47 PM
Last Post: vidhi
  Reading data from excel sheet serenediva 1 8,771 03-03-2017, 10:07 AM
Last Post: vinod123
  [UFT] [WPF] Verify if the cell contains an image robertosalemi 0 1,774 10-25-2016, 06:57 PM
Last Post: robertosalemi
  Need to verify the drop down values based on condition santhoshmscsoftware 1 2,707 05-04-2016, 11:28 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)