cancel
Showing results for 
Search instead for 
Did you mean: 

comparison of excel & PDf

Highlighted
Occasional Contributor

comparison of excel & PDf

Dear Sir/Madam,

I wanted to compare the data in an excel sheet and and a PDF.Could you please help me  with this

4 REPLIES 4
Highlighted
Community Hero

Re: comparison of excel & PDf

For Excel, I would start by using Excel via COM to access the sheet itself, especially if you're doing this kind of comparison and not a data driven test.  See https://support.smartbear.com/testcomplete/docs/testing-with/advanced/working-with-external-data-sou... for beginning information on how to do that.

As for the PDF part, look into using PDFbox as described at https://support.smartbear.com/articles/testcomplete/testing-pdf-files-with-testcomplete

 

I'll leave it up to you to determine the specific implementation you choose to do the comparison but I would start with those two links and start building your code.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Occasional Contributor

Re: comparison of excel & PDf

Hi,

I got how to fetch data from excel and PDf.But I wanted to compare the data in excel and data in PDf.Is there is a possible way to do so

Highlighted
Community Hero

Re: comparison of excel & PDf

Yes... write code to do so.  🙂 

You read the stuff from the Excel, you read it from the PDF, and you do an "if then" to compare or some such thing.  There is nothing "out of the box" to compare the two.  You need to write that code yourself.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Community Manager

Re: comparison of excel & PDf

Hi @manuelaneena,

I agree with tristaanogre. 

Only you know how the data in both files should be matched. Thus, you'll need to script a comparison algorithm that will read data from both sources and compare them as needed. TestComplete supports a set of languages. You can use the one you prefer:

https://support.smartbear.com/testcomplete/docs/scripting/selecting-the-scripting-language.html

---------
Tanya Gorbunova
SmartBear Community Manager

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors