We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

MS Excel track changes could not be accessed using accept and reject changes buttons

We are planning to use the GroupDocs.Comparison product for comparing MS Word and MS Excel. In MS Word when we use this GroupDocs.Comparison product we could be able to use the “Track changes” feature of MS word and Accept and Reject the changes.

We want do the same in MS Excel also. But in MS Excel the “Track changes” feature is not working similar to what we see in MS Word. We cannot accept the “Track changes” feature using the Accept and Reject button in MS Excel.
Could you able check this and provide some information.


Please share following details:

  • Source and target Excel files
  • Specify the API version you are using
  • Sample code
  • Text or the changes that you want to reject
  1. Source and target Excel files included below.
    Files.zip (49.6 KB)

  2. GroupDocs.Comparison API version ->v22.8.0

  3. Sample code:
    using GroupDocs.Comparison;
    string licensePath = “C://Reports//GroupDocs.Total.Product.Family.lic”;
    License license = new License();
    //var ass = license.GetType().Assembly;

         using (Comparer comparer = new Comparer(@"C:/Reports/Disclosure_Source.xlsx"))
             var changes = comparer.GetChanges();    
  4. Text or the changes that you want to reject:
    a) Once the compare operation is done and in the “Excel_Result.xlsx” how the user can use the “Track Changes” option to Accept or Reject the changes?
    You can see the red and green markings of the changes, But how would the end user would be able to use the “Track Changes” option to Accept or Reject the changes?
    image.png (63.5 KB)

b) The “Final” tab from Source file is not in the “Excel_Result.xlsx” file. But the content of the “Final” tab is in “Review” tab with red rectangle.
image.png (57.2 KB)

c) We want the comparison to work like this.

  • We want the contents on the Target file to stay. Any difference from Source need to be added to the Target file as the differences. This difference we want the user to be able to accept or reject using the “Track Changes” option to Accept or Reject the changes.
  • Comparison to work on the tabs also. In the example provided we want the “Final” tab included in the “Excel_Result.xlsx” file and shown as a difference.

d) What is the information in the “Summary page” on the “Excel_Result.xlsx” file? How can we use it?

Let us explain who accept or reject changes work in case of GroupDocs.Comparison. Please take a look at the code below:

using (Comparer comparer = new Comparer("source.xlsx"))
    ChangeInfo[] changes = comparer.GetChanges();
    changes[0].ComparisonAction = ComparisonAction.Reject;
    comparer.ApplyChanges(File.Create("result.docx"), new SaveOptions(), new ApplyChangeOptions() { Changes = changes });

You have to pass source and target files to the API. It’ll compare them and you get the changes in ChangeInfo[]. Once you have the array of changes, you can accept or reject them:
changes[0].ComparisonAction = ComparisonAction.Reject;
Among the changes you have in the array, changes[0] will be rejected and won’t affect in the output file.
However, the accept and reject feature provided be the native applications (e.g. MS Word or Excel), they are something different. GroupDocs API is not linked with them.

In the changes in the ChangeInfo[] will the below checks possible?

  1. Possible to identify the type of change (change is added, modified, deleted etc.) ?
  2. Possible to identify the user(Author) who made the change?

Would you able to provide an example code for the above.

1 Like


Yes, you can ChangeInfo[] shows you if the content is deleted or inserted. However, we are furhter investigating if we can detect the style changes (e.g. font color, or style).

We are also investigating this scenario.
Your investigation ticket ID is COMPARISONNET-3215.

I see trackchanges to Accept or Reject can be done in MS Word using this-> Show results of comparison as a Word Track Changes | Documentation (groupdocs.com)

Example code block to disable the display of revisions

using (Comparer comparer = new Comparer(sourcePath))
    CompareOptions options = new CompareOptions() {WordTrackChanges = true};
    comparer.Compare(resultPath, options);

What I was asking is for Excel similar functionality is provided or can be added from your side?

1 Like


We are also investigating this scenario. You’ll be notified in case of any update.

Wanted to check if any expected timeline by which you will be able to provide an update?


This ticket is under investigation. We’ll notify you as there’s any update.


You just have to pass DetectStyleChanges for CompareOptions. Please take a look at these screenshots.zip (72.5 KB).

This feature is not supported by the API.