Comparison Compare method in GroupDocs (C#) issue with Excel files

I am encountering an issue while using the Compare method in the GroupDocs Comparison library for comparing Excel files. The error message I receive is:

Error:
Error occurred while converting document

This issue occurs specifically with Excel files when I try to compare them using the Comparer.Compare() method. The error does not seem to occur with other document types such as PDFs. The comparison works fine for most other file types, but it fails when processing Excel files.

I am using the following code for comparing the files, and I suspect the issue may be related to how the file streams or conversion process are handled by GroupDocs for Excel documents.

Could you please investigate why this error occurs specifically with Excel files and provide guidance on how to resolve it?

Comparison nuget packet : 25.2

The error persists even when I try both methods:

  1. Using FileStream for reading the files.
  2. Using the file path directly.

However, this issue does not occur with other document types such as PDFs.

I have verified that the paths and files are valid. The problem seems to be related to how the conversion process is handled by GroupDocs for Excel documents.

image.png (110.3 KB)
image.png (169.6 KB)

1 Like

@cdemirkaya

To better assist you, could you please clarify if you are encountering this problem with all Excel files or only specific ones? Additionally, if possible, could you share the problematic Excel files with us?

It would also be helpful if you could provide details about your development environment, such as the operating system and .NET version you are using. This information will help us investigate the issue further.

yeni.7z (9.4 KB)
NET VERSION: 7
Our testing team attempted to use the attached Excel file by selecting it on both sides, which resulted in an error. However, when testing with a different Excel file in the same process, no error occurred. If we select this Excel file and a different document for the opposite side, no issue arises. Additionally, when selecting a different Excel file on both sides, no issue occurs either. I have checked to see if this could be a file stream issue, but it was not the case.

1 Like

@cdemirkaya

We were unable to reproduce the issue on our end using the provided file.

We compared the same file (as both source and target) by loading it as a stream/file but did not encounter any issues. Could you please provide a simple console application that demonstrates how to reproduce the issue? We used the following details for our tests:

  • .NET 7.0
  • GroupDocs.Comparison for .NET 25.2 and 25.3

I checked your GitHub profile but didn’t see the 25.3 version when I initially opened the ticket — only 25.2 was available at the time. Later on, I found 25.3, gave it a try, and it fixed my issue.
Thanks again for your support!

1 Like