Page 1 of 1

Excel and Image Comparison

Posted: Mon Apr 22, 2019 8:13 am
by Punashri M S
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.

Re: Excel and Image Comparison

Posted: Mon Apr 22, 2019 11:18 am
by odklizec
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.

Re: Excel and Image Comparison

Posted: Mon Apr 22, 2019 11:55 am
by Punashri M S
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).

Re: Excel and Image Comparison

Posted: Mon Apr 22, 2019 12:12 pm
by odklizec
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?