Excel and Image Comparison

Ask general questions here.
Punashri M S
Posts: 42
Joined: Tue Jan 30, 2018 12:56 pm

Excel and Image Comparison

Post by Punashri M S » Mon Apr 22, 2019 8:13 am

Hello All,

is there any solution for doing EXCEL data comparison in Spreadsheet using C# codes? (The data are placed in cells, not in table grids).

And am getting the results of image comparison as Actual and Expected images.

But not showing / highlighting, what is the exact changes in the images. This make us to verify the changes manually.

Ranorex have any solutions for this, to reduce this manual effort?
It would help us, if the exact difference is shown in the actual and expected results.

please help me out with the suggestions.

Thanks in advance.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Excel and Image Comparison

Post by odklizec » Mon Apr 22, 2019 11:18 am

Hi,

Comparing Excel files via image comparison is, in my humble opinion, useless. Such approach will never deliver consistent and reliable results. I think you should follow the advices discussed here...
viewtopic.php?f=21&t=9546&p=38692

Basically, you should either use Ranorex excel data connector, to compare both files (as discussed in above post), or you can use a 3rd party library, like Epplus, which offers much more advanced methods for excel files manipulation.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Punashri M S
Posts: 42
Joined: Tue Jan 30, 2018 12:56 pm

Re: Excel and Image Comparison

Post by Punashri M S » Mon Apr 22, 2019 11:55 am

sorry for the inconvenience,

below are the queries.

1. Image Comparison:

The results of image comparison is Actual and Expected images. But we want to highlight the changes in the image also, which Ranorex is unable to do and user is doing it manually. Does Ranorex have any solutions for this, to reduce this manual effort?
It would help us, if the exact difference is shown in the actual and expected results.


2. Data comparison
This we need to compare the values in excel cells. The technology used here is spreadsheet. So, is it possible to keep the excel values in spreadsheet as base values and compare the same at the time we automate the scripts ? (not using record method).

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Excel and Image Comparison

Post by odklizec » Mon Apr 22, 2019 12:12 pm

Hi,

As for the image comparison question, you can enable Ranorex to show differences in report. Check this Ranorex blog article about advanced image validation functions...
https://www.ranorex.com/blog/enhanced-f ... alidation/

As for the excel question, if you mean you want to compare data in opened Excel worksheet, i.e. comparing data via Excel UI, then I’m afraid, I don’t have any example of this. You will have to write some code, which will go though cells of your interest and compare them with your ref. data. I would personally use either direct file comparison instead or, if UI comparison is required, I would consider doing it via Ranorex snapshots. I would suggest you to check this help guide, regarding general table comparison code...
https://www.ranorex.com/help/latest/han ... ntiretable
Of course, you will have to adapt the code, according your needs and table source. Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration