Compare 2 excel files including styles

Ask general questions here.
Posts: 1
Joined: Wed Feb 20, 2019 12:17 pm

Compare 2 excel files including styles

Post by Itaiy » Wed Feb 20, 2019 12:25 pm


I have 2 excel files that I want to compare. The comparison will include:
1. The text of each cell.
2. The format/style of each cell.
The file can be very small (~10 rows) and very large (~200k rows)

I was thinking about 2 ways to do it:
1. Using the epplus library to open the excel files and compare it cell by cell. The disadvantage is that it requires a lot of code and I miss some properties.
2. Copy to clipboard the all excel content and paste it as HTML in code. The disadvantage - large excel files can produce a large string in memory which may cause an out-of-memory exception.

Is there a built-in or simpler way to compare 2 excel files?

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

Re: Compare 2 excel files including styles

Post by odklizec » Thu Feb 21, 2019 8:54 am


I'm afraid, there is no built-in code/action in Ranorex to compare excel files and their style. So using epplus (or similar 3rd party lib or code), is your best hope to achieve what you want.
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