cancel
Showing results for 
Search instead for 
Did you mean: 

Compare 2 Excel files

jsc
Regular Contributor

Compare 2 Excel files

Hi all,

 

at the end of one of my tests I have to compare 2 excel files.

I tried FileCheckpoints, but they are not useful for excel. So I found the ExcelCompare script extension: http://support.smartbear.com/viewarticle/42199/

 

But this extension does not work at all for me. 

It uses about 300MB RAM and crashes each time without any result.

 

I call it like this:

objectExcel.ExcelCompare("C:\\tmp\\test1.xlsm","C:\\tmp\\test2.xlsm", "C:\\tmp\\test3.xlsm")

The size of these excel files is about 300 kb.

 

The problem occurs with Excel 2013 and Excel 2010.

What do I do wrong?

 

Is there any other way to easily compare 2 Excel files without coding the comparison from scratch?

 

Best regards,

Joachim

 

9 REPLIES 9
Ryan_Moran
Valued Contributor

Re: Compare 2 Excel files

Line 96 (resBook.SaveAs resultFile) of the script throws an exception when attempting to save as .XLSM.

 

 

Try:

objectExcel.ExcelCompare("C:\\tmp\\test1.xlsm","C:\\tmp\\test2.xlsm", "C:\\tmp\\test3.xlsx")

 


''-Praise the sun and Give Kudos.''
jsc
Regular Contributor

Re: Compare 2 Excel files

the comparison works, but there are two problems:

1) TestComplete always logs an error: The EXCEL.EXE process crashed.

2) performance: with my 300kb files the comparison took 2.5 minutes.

 

like this (slow, instable) it's not really an option.

 

edit:

I saved as xlsx the last few tries, but it did not work as well.

jsc
Regular Contributor

Re: Compare 2 Excel files

we are now scripting our own ExcelComparison

(extracting sheets and comparing sheets)

Performance is waaaaaaaaay better than the Script Extension.

Ryan_Moran
Valued Contributor

Re: Compare 2 Excel files

Yea I didn't dig too deep into it, but it certainly didn't look like the most efficient process ;).


''-Praise the sun and Give Kudos.''
AlexKaras
Community Hero

Re: Compare 2 Excel files

Hi,

 

How about this extension: http://support.smartbear.com/viewarticle/9046/ ?

I did not compare it with the http://support.smartbear.com/viewarticle/42199/ (Quickly Compare Excel Files) one, so the performance might or might not be better...

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
lokithorshield
Contributor

Re: Compare 2 Excel files

Hey guys is it possible to provide source code for this script extension?

 

Mahesh

HKosova
Moderator

Re: Compare 2 Excel files


@lokithorshield wrote:

Hey guys is it possible to provide source code for this script extension?

 

Mahesh


Hi Mahesh,

 

The source code of script extensions is included in the extension itself. Rename the extension from .tcx to .zip and unzip - the source code is in the .js and .vbs files.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
lokithorshield
Contributor

Re: Compare 2 Excel files

🙂 🙂 🙂

TMUGHILENDRAN
Occasional Contributor

Re: Compare 2 Excel files

Iam using that source code only but i am not able to compare 10Mb size Excel file it take longer tan 30 min.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors