Skip to content

Commit 73a0337

Browse files
Updated basic usage examples
1 parent 1b05ce0 commit 73a0337

7 files changed

Lines changed: 293 additions & 155 deletions

File tree

content/english/net/basic-usage/_index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@ url: /net/basic-usage/
1010

1111
## Basic Usage Tutorials
1212
### [Compare Cells from Path - GroupDocs.Comparison for .NET](./compare-cells-from-path/)
13+
Learn how to compare cells from a path using GroupDocs.Comparison for .NET. Efficiently identify differences between documents.
1314
### [Compare Cells from Stream - GroupDocs.Comparison for .NET](./compare-cells-from-stream/)
15+
Effortlessly compare documents in C# using GroupDocs.Comparison for .NET. Streamline your document processing tasks with ease.
1416
### [Get Document Info from Result Document - GroupDocs.Comparison for .NET](./get-document-info-from-result-document/)
17+
Learn how to retrieve document info from result document using GroupDocs.Comparison for .NET. Easy steps explained for .NET developers.
1518
### [Get Document Info from Path - GroupDocs.Comparison for .NET](./get-document-info-from-path/)
19+
Learn how to extract document info from a path using GroupDocs.Comparison for .NET. Easy steps for efficient document management in C#.
1620
### [Get Document Info from Stream - GroupDocs.Comparison for .NET](./get-document-info-from-stream/)
17-
### [Get Supported Formats - GroupDocs.Comparison for .NET](./get-supported-formats/)
21+
Learn how to efficiently compare documents in .NET using GroupDocs.Comparison, enhancing your document processing workflows seamlessly.
22+
### [Get Supported Formats - GroupDocs.Comparison for .NET](./get-supported-formats/)
23+
Enhance document accuracy and consistency with GroupDocs.Comparison for .NET. Seamlessly integrate this powerful tool into your .NET applications.

content/english/net/basic-usage/compare-cells-from-path/_index.md

Lines changed: 47 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,60 @@
22
title: Compare Cells from Path - GroupDocs.Comparison for .NET
33
linktitle: Compare Cells from Path - GroupDocs.Comparison for .NET
44
second_title: GroupDocs.Comparison .NET API
5-
description:
5+
description: Learn how to compare cells from a path using GroupDocs.Comparison for .NET. Efficiently identify differences between documents.
66
type: docs
77
weight: 10
88
url: /net/basic-usage/compare-cells-from-path/
99
---
10+
## Introduction
11+
Welcome to the comprehensive tutorial on utilizing GroupDocs.Comparison for .NET to compare cells from a path. In this guide, we'll walk you through the process step by step, ensuring you grasp each concept thoroughly. GroupDocs.Comparison for .NET is a powerful tool for comparing various document formats, including cells, text, and images, enabling developers to efficiently identify differences and similarities between documents.
12+
## Prerequisites
13+
Before we dive into the tutorial, ensure you have the following prerequisites set up:
14+
1. GroupDocs.Comparison for .NET Library: Download and install the library from [here](https://releases.groupdocs.com/comparison/net/).
15+
2. Development Environment: Have a working environment with Visual Studio or any other .NET development tool installed.
16+
3. Document Files: Prepare the source and target cells files you want to compare.
17+
4. Basic Knowledge of C#: Familiarity with C# programming language will be beneficial.
1018

11-
## Complete Source Code
19+
## Import Namespaces
20+
Let's start by importing the necessary namespaces in your C# project:
1221
```csharp
1322
using System;
1423
using System.IO;
15-
16-
namespace GroupDocs.Comparison.Examples.CSharp.BasicUsage
24+
```
25+
## Step 1: Set Up Output Directory and File Name
26+
First, define the output directory and file name where you want to save the compared cells file:
27+
```csharp
28+
string outputDirectory = "Your Document Directory";
29+
string outputFileName = Path.Combine(outputDirectory, "result.xlsx");
30+
```
31+
## Step 2: Initialize Comparer and Add Documents
32+
Next, create a Comparer object and add the source and target cells files you want to compare:
33+
```csharp
34+
using (Comparer comparer = new Comparer("source.xlsx"))
1735
{
18-
/// <summary>
19-
/// This example demonstrates comparing of two cells files
20-
/// </summary>
21-
class CompareCellsFromPath
22-
{
23-
public static void Run()
24-
{
25-
Console.WriteLine("\n--------------------------------------------------------------------------------------------------------------------");
26-
Console.WriteLine("[Example Basic Usage] # CompareCellsFromPath : comparing of two cells files\n");
27-
28-
string outputDirectory = "Your Document Directory";
29-
string outputFileName = Path.Combine(outputDirectory, "result.xlsx");
30-
31-
using (Comparer comparer = new Comparer("source.xlsx"))
32-
{
33-
comparer.Add("target.xlsx");
34-
comparer.Compare(outputFileName);
35-
}
36-
Console.WriteLine($"\nDocuments compared successfully.\nCheck output in {outputDirectory}.");
37-
}
38-
}
39-
}
40-
36+
comparer.Add("target.xlsx");
37+
```
38+
## Step 3: Perform Comparison and Save Output
39+
Now, execute the comparison process and save the compared cells file to the specified output directory:
40+
```csharp
41+
comparer.Compare(outputFileName);
4142
```
43+
## Step 4: Display Success Message
44+
Finally, display a success message indicating that the documents have been compared successfully:
45+
```csharp
46+
Console.WriteLine($"\nDocuments compared successfully.\nCheck output in {outputDirectory}.");
47+
```
48+
49+
## Conclusion
50+
Congratulations! You've successfully learned how to compare cells from a path using GroupDocs.Comparison for .NET. This powerful library provides a seamless way to identify differences between documents, enhancing your document processing capabilities.
51+
## FAQ's
52+
### Is GroupDocs.Comparison for .NET compatible with different operating systems?
53+
GroupDocs.Comparison for .NET is compatible with Windows operating systems.
54+
### Can I compare documents of different formats using GroupDocs.Comparison for .NET?
55+
Yes, GroupDocs.Comparison for .NET supports comparing documents in various formats, including cells, text, and images.
56+
### Does GroupDocs.Comparison for .NET offer a free trial?
57+
Yes, you can access a free trial of GroupDocs.Comparison for .NET [here](https://releases.groupdocs.com/).
58+
### How can I get support for GroupDocs.Comparison for .NET?
59+
You can seek support and assistance from the GroupDocs.Comparison community [here](https://forum.groupdocs.com/c/comparison/12).
60+
### Where can I purchase a license for GroupDocs.Comparison for .NET?
61+
You can purchase a license for GroupDocs.Comparison for .NET [here](https://purchase.groupdocs.com/buy).

content/english/net/basic-usage/compare-cells-from-stream/_index.md

Lines changed: 53 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,66 @@
22
title: Compare Cells from Stream - GroupDocs.Comparison for .NET
33
linktitle: Compare Cells from Stream - GroupDocs.Comparison for .NET
44
second_title: GroupDocs.Comparison .NET API
5-
description:
5+
description: Effortlessly compare documents in C# using GroupDocs.Comparison for .NET. Streamline your document processing tasks with ease.
66
type: docs
77
weight: 11
88
url: /net/basic-usage/compare-cells-from-stream/
99
---
10+
## Introduction
11+
In the world of software development, the ability to compare documents efficiently is crucial. Whether you're working on legal documents, contracts, or any other form of text, being able to identify differences accurately can save time and prevent errors. Fortunately, GroupDocs.Comparison for .NET provides a powerful solution for document comparison tasks.
12+
## Prerequisites
13+
Before diving into the tutorial, make sure you have the following prerequisites:
14+
1. GroupDocs.Comparison for .NET: Ensure that you have downloaded and installed GroupDocs.Comparison for .NET. You can find the download link [here](https://releases.groupdocs.com/comparison/net/).
15+
2. Basic Knowledge of C#: This tutorial assumes familiarity with C# programming language.
16+
3. Integrated Development Environment (IDE): Have an IDE like Visual Studio installed on your system for coding purposes.
17+
4. Documents to Compare: Prepare the documents you want to compare. Ensure they are accessible from your C# code.
18+
19+
## Import Namespaces
20+
In order to use GroupDocs.Comparison for .NET functionalities, you need to import the necessary namespaces into your C# code. Follow these steps:
1021

11-
## Complete Source Code
1222
```csharp
1323
using System;
1424
using System.IO;
25+
```
26+
This imports the GroupDocs.Comparison namespace, allowing you to access its classes and methods.
1527

16-
namespace GroupDocs.Comparison.Examples.CSharp.BasicUsage
17-
{
18-
/// <summary>
19-
/// This example demonstrates comparing of two cells files
20-
/// </summary>
21-
class CompareCellsFromStream
22-
{
23-
public static void Run()
24-
{
25-
Console.WriteLine("\n--------------------------------------------------------------------------------------------------------------------");
26-
Console.WriteLine("[Example Basic Usage] # CompareCellsFromStream : comparing of two cells files\n");
27-
28-
string outputDirectory = "Your Document Directory";
29-
string outputFileName = Path.Combine(outputDirectory, "result.xlsx");
30-
31-
using (Comparer comparer = new Comparer(File.OpenRead("source.xlsx")))
32-
{
33-
comparer.Add(File.OpenRead("target.xlsx"));
34-
comparer.Compare(File.Create(outputFileName));
35-
}
36-
Console.WriteLine($"\nDocuments compared successfully.\nCheck output in {outputDirectory}.");
37-
}
38-
}
39-
}
40-
28+
## Step 1: Initialize Output Variables
29+
```csharp
30+
string outputDirectory = "Your Document Directory";
31+
string outputFileName = Path.Combine(outputDirectory, "result.xlsx");
32+
```
33+
This step initializes variables for the output directory and file name where the compared document will be saved.
34+
## Step 2: Create Comparer Object
35+
```csharp
36+
using (Comparer comparer = new Comparer(File.OpenRead("source.xlsx")))
4137
```
38+
Here, a Comparer object is created by opening the source document "source.xlsx" using `File.OpenRead()`.
39+
## Step 3: Add Target Document
40+
```csharp
41+
comparer.Add(File.OpenRead("target.xlsx"));
42+
```
43+
The target document "target.xlsx" is added to the comparer object for comparison.
44+
## Step 4: Perform Comparison
45+
```csharp
46+
comparer.Compare(File.Create(outputFileName));
47+
```
48+
The Compare method is called on the comparer object to perform the document comparison. The compared document is saved using `File.Create()`.
49+
## Step 5: Display Success Message
50+
```csharp
51+
Console.WriteLine($"\nDocuments compared successfully.\nCheck output in {outputDirectory}.");
52+
```
53+
Finally, a success message is displayed indicating that the documents have been compared successfully and the output is available in the specified directory.
54+
55+
## Conclusion
56+
In conclusion, GroupDocs.Comparison for .NET provides a robust platform for comparing documents seamlessly within your C# applications. By following the steps outlined in this tutorial, you can efficiently compare documents and streamline your document processing tasks.
57+
## FAQ's
58+
### Is GroupDocs.Comparison for .NET compatible with all document formats?
59+
Yes, GroupDocs.Comparison for .NET supports a wide range of document formats including Word, Excel, PowerPoint, PDF, and more.
60+
### Can I customize the output format of compared documents?
61+
Absolutely, GroupDocs.Comparison for .NET offers various customization options allowing you to tailor the output according to your requirements.
62+
### Does GroupDocs.Comparison for .NET require a license for commercial use?
63+
Yes, a license is required for commercial usage. You can obtain a license from [here](https://purchase.groupdocs.com/buy).
64+
### Is there a free trial available for GroupDocs.Comparison for .NET?
65+
Yes, you can avail of a free trial [here](https://releases.groupdocs.com/).
66+
### Where can I seek help or support related to GroupDocs.Comparison for .NET?
67+
You can visit the GroupDocs.Comparison forum [here](https://forum.groupdocs.com/c/comparison/12) for any assistance or queries.

content/english/net/basic-usage/get-document-info-from-path/_index.md

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,57 @@
22
title: Get Document Info from Path - GroupDocs.Comparison for .NET
33
linktitle: Get Document Info from Path - GroupDocs.Comparison for .NET
44
second_title: GroupDocs.Comparison .NET API
5-
description:
5+
description: Learn how to extract document info from a path using GroupDocs.Comparison for .NET. Easy steps for efficient document management in C#.
66
type: docs
77
weight: 13
88
url: /net/basic-usage/get-document-info-from-path/
99
---
10+
## Introduction
11+
In the realm of software development, particularly in .NET framework environments, efficient document comparison is a critical necessity. Whether you're working on legal documents, code revisions, or any other content where precision matters, having a robust tool for comparing documents can save time, effort, and potential errors. One such powerful tool in this domain is GroupDocs.Comparison for .NET. This tutorial will guide you through the process of leveraging GroupDocs.Comparison for .NET to obtain document information from a given path, breaking down each step to ensure clarity and ease of implementation.
12+
## Prerequisites
13+
Before diving into this tutorial, ensure you have the following prerequisites set up:
14+
1. Environment Setup: Have a .NET development environment configured and ready.
15+
2. GroupDocs.Comparison for .NET: Download and install GroupDocs.Comparison for .NET from the provided [download link](https://releases.groupdocs.com/comparison/net/).
16+
3. Document to Compare: Prepare a document (e.g., DOCX, PDF) that you want to extract information from.
17+
4. Basic Understanding of C#: Familiarize yourself with C# programming language basics.
1018

11-
## Complete Source Code
19+
## Import Namespaces
20+
In this section, we'll import the necessary namespaces to facilitate document comparison using GroupDocs.Comparison for .NET.
1221
```csharp
1322
using System;
23+
using GroupDocs.Comparison.Interfaces;
24+
```
1425

15-
namespace GroupDocs.Comparison.Examples.CSharp.BasicUsage
16-
{
17-
using GroupDocs.Comparison.Interfaces;
18-
/// <summary>
19-
/// This example demonstrates document info extraction
20-
/// </summary>
21-
class GetDocumentInfoPath
22-
{
23-
public static void Run()
24-
{
25-
Console.WriteLine("\n--------------------------------------------------------------------------------------------------------------------");
26-
Console.WriteLine("[Example Basic Usage] # GetDocumentInfoPath : document info extraction\n");
26+
The System namespace is essential for basic I/O operations and console output, which we'll utilize in our example.
2727

28-
using (Comparer comparer = new Comparer("SOURCE.docx"))
29-
{
30-
IDocumentInfo info = comparer.Source.GetDocumentInfo();
31-
Console.WriteLine("\nFile type: {0}\nNumber of pages: {1}\nDocument size: {2} bytes", info.FileType, info.PageCount, info.Size);
32-
}
33-
Console.WriteLine($"\nDocument info extracted successfully.");
34-
}
35-
}
28+
## Step 1: Initialize Comparer Object
29+
```csharp
30+
using (Comparer comparer = new Comparer("SOURCE.docx"))
31+
{
32+
```
33+
We create a new instance of the `Comparer` class, passing the path of the source document ("SOURCE.docx") as a parameter.
34+
## Step 2: Retrieve Document Info
35+
```csharp
36+
IDocumentInfo info = comparer.Source.GetDocumentInfo();
37+
```
38+
Using the `GetDocumentInfo()` method of the `Source` property, we obtain the document information, including file type, page count, and size.
39+
## Step 3: Display Document Info
40+
```csharp
41+
Console.WriteLine("\nFile type: {0}\nNumber of pages: {1}\nDocument size: {2} bytes", info.FileType, info.PageCount, info.Size);
3642
}
3743
```
44+
We print the extracted document information such as file type, page count, and size to the console for user visibility.
45+
46+
## Conclusion
47+
In this tutorial, we've explored how to utilize GroupDocs.Comparison for .NET to extract document information from a given path using C#. By following the step-by-step guide outlined above, you can seamlessly integrate document comparison functionality into your .NET applications, enhancing productivity and accuracy in document management tasks.
48+
## FAQ's
49+
### Can GroupDocs.Comparison for .NET handle various document formats?
50+
Yes, GroupDocs.Comparison supports a wide range of document formats, including DOCX, PDF, PPTX, XLSX, and more.
51+
### Is there a free trial available for GroupDocs.Comparison for .NET?
52+
Yes, you can avail of a free trial from the provided [link](https://releases.groupdocs.com/).
53+
### How can I obtain temporary licenses for GroupDocs.Comparison for .NET?
54+
Temporary licenses can be acquired from the [temporary license page](https://purchase.groupdocs.com/temporary-license/).
55+
### Where can I find support or seek assistance regarding GroupDocs.Comparison for .NET?
56+
You can visit the GroupDocs.Comparison [support forum](https://forum.groupdocs.com/c/comparison/12) for any queries or assistance needed.
57+
### Is GroupDocs.Comparison for .NET suitable for enterprise-level document management tasks?
58+
Absolutely, GroupDocs.Comparison offers robust features tailored for enterprise-grade document comparison and management requirements.

0 commit comments

Comments
 (0)