Comparison of 2 files. A guide to data comparison software. How to compare two text fragments

Good afternoon dear friends! As a result of creating a text file, we have to subject it to multiple changes. And it is noteworthy that some non-final version of the document can be agreed upon Z for those interested L face 1. As a result, the final text file, which is agreed upon by another ZL 2, may differ significantly from the previously agreed upon version ZL 1 . And such situations can be repeated every day. A Z L maybe 10. Let's study a tool that will protect us and partially automate the process of comparing two documents.

How to compare two documents simultaneously in Word?

In the continuation of the Microsoft Word training course, I will tell you how to compare two text documents for differences at the same time. Knowledge of this function of the MC Word editor will help you make sure that the concept of the text has not changed, or vice versa, find out what and where exactly has changed. Each character (letter, punctuation mark, even space) will be highlighted during the comparison procedure directly in the document. So let's go...

Let's take as an example the most complex tongue twister I've ever encountered, and randomly change the words in different parts of our document so that I can show how to compare two text files. I will name one of the documents (the original one) “1”, and the other “2”.

How to compare two Word documents and highlight the changes?

  1. First, open Microsoft Word.
  2. Go to the tab "Review", In chapter "Comparison" press "Compare"

  1. A drop-down window appears in front of you "Comparison of versions" into which you now need to upload two types of documents: original and modified.

  1. After you have selected two versions of the text document, click “OK”

  1. The comparison results will open in a new window, and it will look something like this:

All deleted and inserted words will appear in the highlighted square with the number “1”. To the right, the area with the number “2” Shows the document being compared with the presence in the text and the words deleted and inserted in their place. The workspace with the number "3" shows us the original document (before making edits), while the space with the number "4" shows us the modified document with the edits made.

  1. The remaining working field numbered “5” is a set of tools necessary for editing the final version of the document being developed.

By clicking “Accept”/“Reject” for the first time, you select the word that you will accept or reject, by clicking the second time you will change to one of the proposed options.

Red crossed out words are marked for deletion, and red underlined words will be replaced.

How to compare two documents if there is no Word?

What to do if you don’t have Word at hand. Many people, having the most common text editor available, are not aware of its enormous potential that goes beyond text formatting. And if you don’t remember how to compare or you have a different text editor, then there is only one way out: mark the words marked for deletion/insertion in one of the following ways:

— fill the text with red color for deleting, green for adding (you can choose arbitrary colors, but for this operation these are the most common ones).

— cross out deleted text/underline inserted text, etc.

Suddenly, if you want to download Microsoft Word, then go to the following link:

If you want to learn more about the capabilities of Word, then go here

For all other questions you can ask in the comments.

Often, when working, you have to compare various modifications of documents, for example, the original and modified editions of materials prepared in Word or in the form of PDF documents or presentations, working and updated versions of price lists with changed prices in Excel, different versions of text documents, etc. .P. In this case, the question is not which version of the files is more recent (this is already clear from the properties of the files), but what is important is what exactly has changed in the documents in terms of content. Comparing documents manually is a thankless task because it takes too much time and the possibility of errors, because it’s easy not to notice some important detail when viewing. It is much more reasonable to delegate the task of comparing files to a computer. In general, in terms of comparing Word documents, everything is going quite well without the use of auxiliary tools, although in versions of Word 2002 and Word 2003 this feature is reliably hidden from prying eyes, and probably not many users are even aware of its existence. The fact is that to compare documents here you must first download the source file. Then, from the Tools menu, open the Compare and Merge Corrections command, specify the file to compare with the original, and enable the Black Lines checkbox. Only after these manipulations will the “Merge” button turn into the “Compare” button, and when you click on this button, the program will compare the files.

The results of the comparison will be shown in the newly created document in traditional review mode. With the advent of Word 2007, everything has become much easier, since now you just need to switch to the "Review" tab, click on the "Compare" button and specify the versions of the document you are comparing. The result of the comparison will be presented in a new document, where the reviewed document will be displayed on the left, taking into account the changes, and on the right (one above the other) the original and changed documents. Theoretically, in Excel it is also possible to compare documents using built-in tools, however, only when working in the mode of recording changes. However, this is inconvenient, since each of the changed cells will have to be viewed by hovering the mouse over it, since changes made to the document are displayed in pop-up windows (about the same as regular notes).

Secondly, if the named mode is not first enabled (command "Tools" > "Corrections" > "Select corrections", checkbox "Track corrections"), then it will be impossible to compare XLS files.

As for quickly comparing PDF documents, this feature, of course, is available in Acrobat 9 Pro and Acrobat 9 Pro Extended, but these solutions are not installed on every computer. Therefore, if you need to quickly compare Excel tables, PDF documents, presentations, as well as documents in other formats, in particular, text files and program codes, you have to resort to using additional tools. There are many options here, and these can be either complex solutions that allow you to work with several file formats, or highly specialized utilities. A considerable part of such solutions are offered for decent money - for example, the price of one of the most famous complex solutions in this area, Diff Doc, is $99.95, and the Araxis Merge utility, which is very popular among programmers, is priced at €119. At the same time, there are also quite affordable or even free programs of this kind on the market; it is precisely these solutions that we will evaluate in this article. In this case, we will focus on complex solutions, and from highly specialized tools we will note only utilities for quickly comparing Excel tables, since this is one of the most pressing tasks, and comparing Excel documents with complex solutions, although possible, is less effective than using highly specialized utilities .

⇡ Comprehensive solutions for quick comparison of documents

Compare Suite 7.0

Developer: AKS-Labs
Distribution size: 3.79 MB
Spreading: shareware Compare Suite is a convenient tool for quickly comparing text files, MS Office documents, RTF documents, PDF files, web pages (HTM), PowerPoint presentations, binary and some other types of files, as well as files in ZIP and RAR. archives and on FTP servers. When comparing program listings in a number of programming languages ​​(Object Pascal, HTML, C/C++, JavaScript, PHP, etc.), syntax highlighting is provided. There is functionality for synchronizing text files and comparing folders with subfolders. The demo version of the program (available in Russian localization) is operational for 30 days and is fully functional. The commercial version costs $60. The technology for comparing files in Compare Suite is simple. First, you select a method for comparing files, for which you need to select one of the options in the “Compare” menu: “character by character”, “word by word”, “by keywords”. Classic character-by-character comparison is useful in situations where you need to capture the slightest differences in the spelling of words - for example, when comparing program listings. Word-by-word document comparison is typically used to compare different versions of the same file. Using the keyword comparison method, you can compare dissimilar documents even when word-by-word comparison is not possible.

After selecting the comparison method, in the “File” menu you need to select the “New file comparison” command and indicate the files to compare in the left and right panels. The program will analyze the files and highlight all existing differences (added, changed and deleted fragments) in different colors. Additionally, you can create a comparison report with detailed information about the files being compared (command "File" > "Report"). When comparing files other than text, you should keep in mind that their comparison in all complex solutions (both in Compare Suite and in other utilities) is carried out after conversion to text format. In practice, this means, for example, that if in the compared versions of a Word document the same word in a particular sentence appears on different lines, then it will be included in the list of changes. When comparing XLS documents, data from tables is extracted before analysis, and the differences found are displayed line by line in text format, indicating the sheet name and column names, which allows you to navigate the data. The same scheme is used to compare PDF documents and PowerPoint presentations.

Compare It! 4.1.2174

Developer: Grig Software
Distribution size: 1.79 MB
Spreading: shareware Compare It! - a convenient tool for quickly comparing files of various formats, including text files, MS Word and MS Excel documents, RTF documents, files in PDF formats, etc. It is possible to compare files in binary mode, files in ZIP archives, and compare folders . When comparing program listings in C++, Java, C#, Delphi, HTML, syntax highlighting is provided. The demo version of the program (available in Russian localization) is operational for 30 days and is fully functional. The cost of the commercial version is $29. An outdated version of this utility (3.86) is offered on the website grigsoft.ru and in the Softkey.ru store for 300 rubles. (home license) or 400 rub. (commercial license). This version supports a smaller list of file formats (in particular, it cannot be used to compare DOCX, XLSX documents) and there may be problems with comparing a number of XLS files. By default, Compare It! launches with an English interface. To switch to the Russian interface, select the menu "Options" > "Options", on the "Language" tab, set the "Russian" option and restart the program. File comparison options are set in the Preferences dialog box (Settings > Preferences) on the Compare tab. Here you can set the program to ignore spaces, special escape characters, line breaks, etc. when comparing, and also enable/disable the so-called Alternative Comparison, designed to make modified strings easier to read and useful for comparing source code.

To compare files in Compare It! You need to select the “Compare files” command in the “File” menu and specify the documents being compared one after another (you can do it right away if the files are in the same folder). After this, the utility will load the files into the left and right panels and immediately highlight the identified differences in them. Differences in text fragments in the compared documents are highlighted in color, and fragments missing from one of the files are conventionally displayed as a shaded area. Information about differences can be saved as a report (File menu > Report). Comparison of non-text documents is usually implemented, that is, after conversion to text format. Note that when comparing Excel documents, columns are even maintained, which we really liked and was not noted in other similar solutions. But the results of comparing Word and PDF documents were not very inspiring. The fact is that in this utility the principle of displaying differences is somewhat different - fragments with changes are highlighted completely. If when comparing program code and Excel tables this did not seem inconvenient to us, then when comparing documents with paragraphs it did not cause delight. And for the simple reason that in the end too much text ends up being highlighted, and your eyes just get tired. But, alas, this particular principle of selection seems to be considered the norm by developers, since in other utilities discussed below, we encountered a similar situation.

Beyond Compare 3.1.9

Developer: Scooter Software, Inc.
Distribution size: 5.27 MB
Spreading: shareware Beyond Compare is a convenient cross-platform (Windows, Linux) solution for quickly comparing text and binary files, performing comparisons in HEX mode, as well as comparing files in ZIP archives and folders. It is possible to compare pictures, data from MP3 files and different versions of files (we are talking about comparing not the contents of the files, but their properties: size, date of last modification, etc.). Syntax highlighting has been implemented when comparing program codes written in C++, C#, Cobol, Delphi, HTML, Java, SQL, XML, Perl, Visual Basic and a number of other programming languages. Synchronization of folders and individual files is provided, including between a local disk and an FTP server, or between a desktop computer and a laptop. The functionality of the utility can be expanded by connecting plugins, of which there are many on the developer’s website. In particular, there are plugins that, by connecting them, the program can be “taught” to compare Word and Excel documents, PowerPoint presentations, HTML files as text, etc. The program (there is no Russian localization) is presented in two editions: the basic Standard and the extended Pro, detailed comparison editions are available at this address. The demo version of the utility is operational for 30 days and is fully functional. The cost of the commercial version of the Standard edition is $30, the Pro edition is $50. The operating principle of Beyond Compare is completely different than in other solutions discussed in the article. This utility is based on the use of comparison sessions, which have individual settings and can be saved to disk. This approach is convenient if some kind of comparison or synchronization operation (the second, of course, is more relevant in this sense) is performed regularly, since it eliminates the need to re-configure parameters. Individual comparison areas in Beyond Compare are presented in the form of various modules ("Folder Compare", "Text Compare", "Data Compare", etc.), combined under a single shell. Understanding their work is not difficult. To compare text files that interest us in this article, just click on the “Text Compare” button in the main program window. And then open the compared files in the left and right panels (the "Open File" button) or paste text into these panels via the clipboard. If desired, you can configure the utility so that the comparison does not take into account, for example, empty lines, spaces, and tabs. The program has two comparison methods - Standard and Alternate. In most cases, Standard is used, and the alternative comparison method, according to the developers, can give better results for files that include repeated text. The comparison parameters are adjusted in the session settings (menu "Session" > "Session Settings").

In principle, through the “Data Compare” module in the utility, it is possible to compare tables, but only if two conditions are met. Firstly, we are talking about comparing completely identical documents in which individual values ​​(say, prices) have simply been changed, and not about tables in which columns or rows have been added or deleted. Second, the tables must be in data files (say, CSV), meaning that you will first have to save them in CSV format before comparing Excel tables. Of course, this is not a very convenient option, and the results are given somewhat specifically - with row offsets, but it still works. Switching between the "Text Compare", "Data Compare" and other modules is done through the "Session" > "New Session" menu. If you do not do this, but simply open new files for comparison, then the utility will compare them using the templates of the previously activated module. If the listed options for comparing documents are not enough, then you should turn to plugins, thanks to which the utility will learn to compare documents of other formats. After downloading, the plugins need to be connected using the "Tools" > "Import Settings" command and specifying the appropriate plugin on your hard drive. Having carried out a similar operation, we tried to compare Word and Excel documents using the "Text Compare" module - the results turned out to be quite decent, although the Beyond Compare developers are overly keen on completely selecting fragments with the presence of changes.

WinMerge 2.12.4

Developer: Thingamahoochie Software
Distribution size: 3.06 MB
Spreading: free WinMerge is a simple utility for visual comparison of text documents (Windows, Unix and Mac), distributed under the GNU/GPL license. When comparing program codes, syntax highlighting is provided for a number of programming languages, including C++, C#, Delphi, Visual Basic and XML/HTML. It is possible to compare folders. The functionality of the utility can be expanded by connecting plugins. For example, the xdocdiff plugin will allow you to use the utility to compare Word, Excel and PowerPoint documents, PDF files, as well as a number of others. The program (available in Russian language localization) can be downloaded and used completely free of charge. To compare text documents in WinMerge, just use the “File” > “Open” command and specify the files being compared in the “Left” and “Right” fields. After this, the utility will produce a result in which in each of the compared documents all different lines will be highlighted. The program can also show in more detail the differences within the line specified to it (in a special area at the bottom of the main window), for which you just need to double-click on the line of interest. Plugins (there are only two of them on the developer’s website so far) are not included in the package, and therefore are downloaded and installed (with subsequent copying of the files and folders specified in the instructions to the utility folder) separately. Their use is not entirely obvious. For example, in order to make it possible to compare documents using the xdocdiff plugin, you need to additionally specify its unpacker in the file opening window.

After this, WinMerge begins to compare Word documents no worse than commercial solutions. We were also impressed by the results of comparing Excel tables, which were also at the level of commercial analogues. As for PDF files, the experiment with our test files failed. And this is not surprising - the fact is that converting such documents into a text format is quite difficult to implement in practice, due to the specific structure of the PDF format. As a result, the presence of declared support for a given format in a particular utility does not yet indicate a 100% comparison of any PDF files in it without exception. This is exactly what happened in the WinMerge program, to which we (as well as our competitors) initially fed PDF files generated not in Adobe Acrobat, but in the Document2PDF Pilot utility that was at hand. It was only after we took the time to install Adobe Acrobat Pro and create test files in it that WinMerge demonstrated its ability to compare PDF documents.

Active File Compare 2.0

Developer: Formula Software, Inc.
Distribution size: 1.08 MB
Spreading: shareware Active File Compare is a simple utility for quickly comparing text files in visual mode. Convenient for comparing program listings, since it supports syntax highlighting in 16 file types: C++, C#, Java, Delphi, Pascal, Visual Basic, SQL, HTML, PHP, XML, Perl, Assembler, Fortran, Foxpro, etc. The files being compared are may be in ZIP, TAR or GZip archives. It is possible to synchronize different fragments of files after comparison. The demo version of the program (there is a Russian localization) is fully functional, but can be launched no more than 60 times. The cost of the commercial version is 190 rubles. By default, Active File Compare launches with an English interface. To switch to the Russian interface, select the “Options” > “Settings” command and on the “Language” tab set the “Russian” option. Comparing files in this utility is not difficult. You need to load the files being compared to the left and right panels, respectively, and if necessary, if the file type was not detected automatically, you should specify it yourself by selecting the appropriate item in the drop-down list of the button panel. If the comparison operation needs to be carried out without taking into account the case of characters, spaces, tabs, etc., then you need to check the appropriate boxes in the "Options" menu. After completing the settings, all you have to do is click on the “Compare text files” button.

File comparison results are displayed with special icons to the left of the text. There are two such icons - a “red triangle” signals the presence of differences in the corresponding line, and a “cross on a yellow background” indicates an empty line.

⇡ Tools for quickly comparing Excel tables

Compare Spreadsheets for Excel 1.1.5

Developer: OOO "MAPILab"
Distribution size: 8.7 MB
Spreading: shareware Compare Spreadsheets for Excel is perhaps the most effective solution for quickly comparing Excel spreadsheets. It is used to compare two sheets of two selected books or ranges selected on them, and not only values, but also formulas can be compared. Presented as a plugin for Microsoft Excel (2000/2002(XP)/2003/2007). The demo version of the program (available in Russian localization) is operational for 20 days and is fully functional. The cost of the commercial version is 1600 rubles. After installing Compare Spreadsheets for Excel in MS Excel, an additional panel of the same name appears with two buttons: “Find differences” and “Help”. To carry out a comparison, which is carried out under the control of a wizard, you first need to click on the “Search for Differences” button and specify the source books, sheets on them and ranges. There is no need to open the source books before doing this.

Then you need to decide what to focus on (looking for deleted, added or changed rows or columns) and choose a comparison method. The simple cell overlay method searches only for changed cells, while the alignment method searches not only for changed cells, but also for deleted and added cells.

After this, you need to specify which columns or rows of the left range of cells should be compared with the rows or columns of the right range of cells, and configure the comparison parameters - by formulas or values, whether to take into account case and/or cell format. If desired, at the last stage you can adjust the report parameters, that is, the appearance of the highlighting of added, deleted and changed cells. The result of the comparison opens in a separate window, with added cells highlighted in green by default, deleted ones in blue, and changed ones outlined in a red frame, which in practice turns out to be very easy to read.

Excel Compare 2.3

Developer: Formula Software, Inc.
Distribution size: 1.11 MB
Spreading: shareware Excel Compare is a convenient utility for quickly comparing Excel documents. Can compare worksheets of the same name in two files or specific ranges in them, and can also be used to compare all worksheets of the same name in the compared files, or all files located in two selected folders. The demo version of the program (there is a Russian localization) is fully functional, but can be launched no more than 60 times. The cost of the commercial version is 290 rubles. To compare tables in Excel Compare, after launching the utility, you need to select the source workbooks, the sheets in them and the ranges of interest (the latter can be omitted), and also set the unique row identifier columns for both selected sheets, then click on the "Compare" button. There is no need to open the original workbooks in Excel before comparing.

Upon completion of the analysis, a new workbook with a difference report will be created, in which the unique data in the first and second compared ranges (or sheets as a whole) will be marked in green and blue. Theoretically, the data obtained during comparison (deleted, added and changed) can be divided into three separate sheets, but for this, the corresponding checkbox must be enabled in the comparison settings window.

Xc Excel Compare Tools 1.0

Developer: xcexcelcompare
Distribution size: 39.7 kb
Spreading: free xc Excel Compare Tools is a macro designed to quickly compare specified working Excel documents - sheets or workbooks; in this case, not only values, but also formulas can be compared. This macro (there is no Russian localization) can be downloaded and used completely free of charge. Before running a workbook with a macro, you need to change the macro security level to "medium" by selecting the corresponding checkbox in the "Security" window, called by the command "Tools" > "Macro" > "Security". After launching a workbook with a macro in Excel, an additional xcCompare Tools toolbar will appear.

This macro is quite convenient for comparing completely identical documents (price lists), in which individual values, say, prices, have simply been changed. To carry out such a comparison, you need to click on the “Compare” button and specify the source books in the window that opens. In the case of comparing books, you can immediately click on the “Compare Book” button, and when comparing sheets, you must additionally highlight the sheets and click on the “Compare Sheet” button. If necessary, in the same settings window you can adjust what needs to be compared - values ​​or formulas.

The generated difference report is created in a separate Excel workbook, in which cells with differing data are displayed, indicating the row and column numbers of these cells and the values ​​in them.

At the same time, different cells in the compared documents are highlighted, which allows you to instantly find your bearings.

But comparing Excel documents in which columns or rows have been added/deleted is not very convenient here. The fact is that xc Excel Compare Tools “does not understand” these kinds of differences and simply records the different values ​​in the report.

Spreadsheet Compare 1.15

Developer: Steve Towner
Distribution size: 1.08 MB
Spreading: free Spreadsheet Compare is a plugin for Microsoft Excel (2000/2002(XP)/2003/2007), designed for quickly comparing Excel tables. Allows you to compare individual sheets or books as a whole with the ability to take into account blocks of cells ignored when comparing. This plugin (there is no Russian localization) can be downloaded and used completely free of charge. After installing the application in MS Excel, a button to launch the "Start Spreadsheet Compare" plugin appears. To make a comparison, you need to open the source books and click on this button. Then specify the books being compared and define comparison parameters - for example, you can change the colors used to highlight different cells, add a separate column to the source sheets with notes in different cells, specify the line from which to start analyzing cells when comparing (can speed up the process), and etc.

Then you need to configure the comparison areas and define the parameters of the report to be created and click on the "Compare" button. At the end of the analysis, which takes longer than in the other solutions considered, all the different cells in the original table will be marked with color. In addition, a resulting table with the corrected values ​​will be created in the new workbook. And the generated differences report will indicate the numbers and values ​​of the differing cells.

As practice has shown, this plugin can be used to analyze identical tables with values ​​that have changed in some cells. But comparing tables with added and/or deleted columns/rows will be ineffective, since the plugin “does not understand” such operations and simply conscientiously records different values.

⇡ Conclusion

We tried to consider the most affordable or even free solutions for quickly comparing documents. At the same time, we limited ourselves to only the very minimum information about each of them and are well aware that the description, for example, of tools such as Compare Suite or Beyond Compare turned out to be somewhat modest. But we did not set out to describe all the capabilities of the programs under consideration, but limited ourselves only to the functions that are of interest in the context of this article, that is, a quick comparison of documents. In conclusion, I would like to note that, in our opinion, it is still more convenient to compare Word documents using the editor itself, since in utilities that provide comparison of this kind of files, the latter are first converted into text format with all the ensuing consequences. That is, completely identical words that appear on adjacent lines in the compared documents are identified as different, which complicates working with documents. With regard to all other formats considered, it is impossible to do without specialized programs for quickly comparing documents. If you have to deal with different formats at work, you need to focus on programs such as Compare Suite, Compare It!, Beyond Compare or WinMerge (see Table 1). And if you only need to compare Excel tables, then it is better to use one of the utilities specifically designed to work with such data (see Table 2), since the effectiveness of comparing tables in them is not comparable to comparing tables using complex solutions. As for whether it is worth purchasing a paid program or limiting yourself to a free one or simply a cheaper one, but theoretically having similar (as part of document comparison) functionality, then everything is not entirely obvious. Take, for example, the Compare Suite and WinMerge solutions. Both utilities have a Russian-language interface and can compare text files, program listings (with syntax highlighting in a variety of languages), Word and Excel documents, PowerPoint presentations and files in PDF formats. Only the first one is offered for $60, and the second one is free. It is clear that the majority will immediately choose WinMerge, but this will not be the right decision for everyone. Why? The fact is that by installing Compare Suite, you can immediately begin solving the main task, that is, comparing documents. At the same time, having chosen WinMerge, you will first have to deal with the nuances of setting the color scheme, since by default they are extremely unsuccessful and do not allow you to instantly capture the fragments that differ in the compared documents. And then you will also have to worry about the problem of downloading and configuring plugins, without which the utility’s capabilities will be limited only to comparing text documents. Well, in addition, do not forget that Compare Suite has three methods for comparing files and a more convenient principle for recording differences, which makes the comparison process more efficient. So you have to pay for the pleasure of working immediately and comfortably.

Table 1. Utility functionality for quick document comparison

Programs/Features Compare Suite
($60)
Compare It!
($29)
Beyond Compare
($30)
WinMerge
(for free)
Active File Compare
(190 rub.)
Word documents +
(DOC, DOCX)
+
(DOC, DOCX)
+
+
(DOC, DOCX); plugin required
-
Excel documents +
(XLS, XLSX)
+
(XLS, XLSX)
+
+
(XLS, XLSX); plugin required
-
Text files +
+
(including syntax highlighting)
+
(including syntax highlighting)
+
(including syntax highlighting)
+
(including syntax highlighting)
PDF files + + -
(possibly by connecting a plugin, but this is only available for Linux)
+
(requires plugin)
-
PowerPoint Presentations +
(PPT, PPTX)
- +
+
(PPT, PPTX); plugin required
-
HTML files +
(as text)
+
(as code)
+
(as code); it is possible to compare HTML files as text after installing the plugin
+
(as code)
+
(as code)
Comparison of files in archives +
(ZIP and RAR)
+
(ZIP)
+
(ZIP)
+
(7-Zip); plugin required
+
(ZIP, TAR, GZip)
Comparing files on FTP servers + + - -

table 2. Utility functionality for quickly comparing Excel tables

Programs/Features Compare Spreadsheets for Excel
(1600 rub.)
Excel Compare
(290 rub.)
xc Excel Compare Tools
(for free)
Spreadsheet Compare
(for free)
Book comparison - +
(all books in the specified folders, two books)
+ +
Comparison of sheets + + + +
Comparison of ranges highlighted on the specified sheets + + - -
(can be done indirectly by specifying a range of cells that do not need to be compared)
Correct accounting of added and/or deleted columns/rows + + - -
Ability to compare formulas + - + -

Compare is one of the most useful plugins. And if you need to compare 2 files in Notepad++, compare is what you need.

In order to compare files in notepad++, let’s check if the plugin is installed. To do this, open the plugins tab. If it is not installed, go to the Plugin Manager: Plugins - Plugin Manager - Compare - Install. After installing the plugin, the editor will reboot.

In notepad++, comparing files is quite simple: open the two files that need to be compared, press Ctrl+Alt+1 or perform an action in the menu.

After this, we have three sections of the window: the first file, the second and the Compare NavBar in which differences in documents, if any, are graphically marked. Thus, we compared two files Notepad++ editor.

In notepad++, comparing two files turned out to be quite simple, as you can see, the notepad++ editor carries out a line-by-line comparison of files with highlighting of lines with different code. For me, as for many webmasters, this editor is the best.

Need to compare two Microsoft Excel files? Here are two easy ways to do this.

There are many reasons why you might want to take one Excel document and compare it to another. This can be a time consuming task.

it requires a lot of concentration, but there are ways to make your life easier.

Do you need to take a closer look manually or do you want Excel to do some of the heavy lifting

on your behalf, here are two easy ways to compare multiple sheets.

How to Compare Excel Files

Excel allows users to display two versions of a document at once to quickly identify the differences between them:

  1. First, open the workbooks you want to compare.
  2. Switch to View > Window > Side View.

Comparing Excel files by eye

To begin, open Excel and any workbooks you want to compare. We can use the same technique to compare sheets in the same document

or completely different files.

If more than one sheet is obtained from the same book, it must be separated in advance. To do this, go to View > Window > New Window.

This won't separate the individual sheets permanently, just open a new instance of your document.

This menu will list all tables that are currently open. If you only have two open, they will be selected automatically.

Make your selection and click Fine. You will see both tables appear on the screen.

If it's more convenient, you can use Arrange everything button to switch between vertical and horizontal configuration.

One important option to be aware of is Synchronized scrolling switching

Enabling this option ensures that when you scroll one window, the other will move in sync. This is important if you are working with a large table

and you want to keep testing one against the other. If for any reason the two sheets are not aligned, simply click Reset window position.

Comparing Excel Files Using Conditional Formatting

In many cases, the best way to compare two spreadsheets may be to simply display them on the screen at the same time. However, it is possible to somewhat automate the process.

Using Conditional Formatting

We can check Excel for any discrepancies between the two sheets. This can save a lot of time if all you need to find are the differences between one version and another.

For this method, we need to make sure that the two sheets we are working with are part of the same workbook. To do this, right-click the name of the sheet you want to transfer and select Move or copy.

Here you can use the drop-down menu to decide which document it will be pasted into.

Select all the cells that are filled in the worksheet where you want any differences to be highlighted. A quick way to do this is to click the cell in the top left corner and then use the shortcut

Ctrl + Shift + End.

Switch to Home> Styles> Conditional Formatting> New Rule.

Choose Use a formula to determine which cells to format and enter the following:

A1sheet_name!A1

Just remember to post "sheet_name" for any other sheet name. This formula only checks when a cell on one sheet does not exactly match the corresponding cell on another sheet, and flags each instance.

Above you can see the results. All cells containing changes have been highlighted in red, allowing you to quickly and easily compare the two sheets.

Let Excel do the hard work

The above technique demonstrates one way you can let Excel handle some of the heavy lifting. Even if you pay close attention, there is a chance that you might miss a change if you perform this task manually. With conditional formatting, you can be sure nothing slips through the web.

Excel is good at monotonous and detail-oriented work. Once you've mastered its capabilities, you can save yourself some time and effort by using techniques like conditional formatting and a little creativity.

Do you have any advice for comparing documents in Excel? Or do you need help with the processes described in this guide? Either way, why not join the conversation in the comments section below?

Sometimes there is a need to compare several files with each other. This may be useful when analyzing the differences between several versions of a configuration file or simply to compare different files. Linux has several utilities for this, both through the terminal and in the graphical interface.

In this article we will look at how Linux file comparison is performed. Let's look at the most useful methods, both for the terminal and in graphical mode. First, let's look at how to compare a Linux file using the diff utility.

The diff linux utility is a program that runs in console mode. Its syntax is very simple. Call the utility, transfer the necessary files, and also set options, if necessary:

$ diff options file1 file2

You can transfer more than two files if necessary. Before moving on to the examples, let's look at the utility options:

  • -q- display only file differences;
  • -s- display only matching parts;
  • -With- display the required number of lines after matches;
  • -u- output only the required number of lines after differences;
  • -y- display in two columns;
  • -e- output in ed script format;
  • -n- output in RCS format;
  • -a- compare files as text, even if they are not text;
  • -t- replace tabs with spaces in the output;
  • -l- divide into pages and add support for paging;
  • -r- recursive comparison of folders;
  • -i- ignore case;
  • -E- ignore changes in tabs;
  • -Z- ignore spaces at the end of the line;
  • -b- ignore spaces;
  • -B- ignore empty lines.

These were the main options of the utility, now let's look at how to compare Linux files. In the output of the utility, in addition to directly displaying the changes, it displays a line in which it is indicated in what line and what was done. The following symbols are used for this:

  • a- added;
  • d- deleted;
  • c- changed.

In addition, lines that differ will be indicated by the symbol<, а те, которые совпадают - символом >.

Here are the contents of our test files:

Now let's compare the diff files:

diff file1 file2

As a result, we get the line: 2,3c2,4. It means that lines 2 and 3 have been changed. You can use options to ignore case:

diff -i file1 file2

The output can be drawn in two columns:

diff -y file1 file2

And using the -u option, you can create a patch, which can then be applied to the same file by another user:

diff -u file1 file2

To process multiple files in a folder, it is convenient to use the -r option:

diff -r ~/tmp1 ~/tmp2

For convenience, you can redirect the utility output directly to a file:

diff -u file1 file2 > file.patch

As you can see, everything is very simple. But not very convenient. It's more enjoyable to use graphical tools.

Comparing Linux Files Using GUI

There are several excellent tools for comparing files on Linux in a GUI. You can easily figure out how to use them. Let's look at a few of them:

1.Compare

Kompare is a graphical diff utility that allows you to find differences in files and also merge them. Written in Qt and designed primarily for KDE. Here are its main features:

  • Supports multiple diff formats;
  • Support comparison of linux file and directories;
  • Support for viewing diff files;
  • Customizable interface;
  • Creating and applying patches to files.

2. DiffMerge

DiffMerge is a cross-platform program for comparing and merging files. Allows you to compare two or three files. On-the-fly line editing is supported.

Peculiarities:

  • Directory comparison support;
  • Integration with file viewer;
  • Customizable.

3. Meld

It is a lightweight tool for comparing and merging files. It allows you to compare files, directories, and also perform version control functions. The program was created for developers and has the following features:

  • Comparison of two and three files;
  • Using custom types and words;
  • Automatic merging mode and actions with text sides;
  • Support for Git, Mercurial, Subversion, Bazar and much more.

4. Diffuse

Diffuse is another popular and fairly simple tool for comparing and merging files. It is written in Python. Two main features are supported - file comparison and version control. You can edit files while viewing. Main functions:

  • Syntax highlighting;
  • Keyboard shortcuts for easy navigation;
  • Supports unlimited cancellations;
  • Unicode support;
  • Support for Git, CVS, Darcs, Mercurial, RCS, Subversion, SVK and Monotone.

5.XXdiff

XXdiff is a free and very powerful tool for comparing and merging files. But the program has several disadvantages. This is the lack of support for Unicode and file editing.

Peculiarities:

  • Shallow or recursive comparison of one or two files and directories;
  • Highlighting differences;
  • Interactive association;
  • Support for external diff tools such as GNU Diff, SIG Diff, Cleareddiff and more;
  • Extensibility via scripting;
  • Customizability.

6. KDiff3

KDiff3 is another excellent, free tool for comparing files in the KDE desktop environment. It is part of the KDevelop suite of programs and runs on all platforms, including Windows and MacOS. You can compare two linux files for two or three, or even compare directories. Here are the main features:

  • Display differences line by line and character by character;
  • Auto merge support;
  • Handling merge conflicts;
  • Unicode support;
  • Show differences;
  • Supports manual leveling.

conclusions

In this article, we looked at how to compare Linux files using the terminal, how to create patches, and also made a short review of the best graphical utilities for comparing files. What comparison tools do you use? Write in the comments!