Skip to content

Commit 86475fc

Browse files
committed
add MsExcelDiff support
1 parent 98d1898 commit 86475fc

10 files changed

Lines changed: 95 additions & 7 deletions

File tree

readme.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ DiffEngine manages launching and cleanup of diff tools. It is designed to be use
2929

3030
[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=DiffEngine) is a major sponsor and is proud to contribute to the development this project.
3131

32-
[![Entity Framework Extensions](https://raw.githubusercontent.com/VerifyTests/DiffEngine/refs/heads/main/docs/zzz.png)](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=DiffEngine)<!-- endInclude -->
32+
[![Entity Framework Extensions](https://raw.githubusercontent.com/VerifyTests/DiffEngine/refs/heads/main/docs/zzz.png)](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=DiffEngine)
33+
34+
### Developed using JetBrains IDEs
35+
36+
[![JetBrains logo.](https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.svg)](https://jb.gg/OpenSourceSupport)<!-- endInclude -->
37+
3338

3439

3540
<!-- toc -->

src/DiffEngine.Tests/defaultOrder.include.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@
2222
* **[Cursor](/docs/diff-tool.md#cursor)** Windows/OSX/Linux (Cost: Free and Paid)
2323
* **[VisualStudio](/docs/diff-tool.md#visualstudio)** Windows (Cost: Paid and free options)
2424
* **[MsWordDiff](/docs/diff-tool.md#msworddiff)** Windows (Cost: Free)
25+
* **[MsExcelDiff](/docs/diff-tool.md#msexceldiff)** Windows (Cost: Free)

src/DiffEngine.Tests/diffToolList.include.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@
2222
* **[Cursor](/docs/diff-tool.md#cursor)** Windows/OSX/Linux (Cost: Free and Paid)
2323
* **[VisualStudio](/docs/diff-tool.md#visualstudio)** Windows (Cost: Paid and free options)
2424
* **[MsWordDiff](/docs/diff-tool.md#msworddiff)** Windows (Cost: Free)
25+
* **[MsExcelDiff](/docs/diff-tool.md#msexceldiff)** Windows (Cost: Free)

src/DiffEngine.Tests/diffTools.include.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,46 @@ DiffTools.UseOrder(DiffTool.KDiff3);
348348
* `/Applications/kdiff3.app/Contents/MacOS/kdiff3`
349349
* `%PATH%kdiff3`
350350

351-
### [MsWordDiff](https://github.com/SimonCropp/MsWordDiff)
351+
### [MsExcelDiff](https://github.com/SimonCropp/MsOfficeDiff)
352+
353+
* Cost: Free
354+
* Is MDI: False
355+
* Supports auto-refresh: False
356+
* Supports text files: False
357+
* Use shell execute: False
358+
* Create no window: True
359+
* Environment variable for custom install location: `DiffEngine_MsExcelDiff`
360+
* Supported binaries: .xls, .xlsx
361+
362+
#### Tool order:
363+
364+
Use [tool order](diff-tool.order.md) to prioritise MsExcelDiff over other tools.
365+
366+
```
367+
DiffTools.UseOrder(DiffTool.MsExcelDiff);
368+
```
369+
370+
#### Notes:
371+
372+
* Install via `dotnet tool install -g MsExcelDiff`
373+
* Requires Spreadsheet Compare (Office Professional Plus / Microsoft 365 Apps for Enterprise)
374+
* Uses Microsoft's Spreadsheet Compare to show differences between workbooks
375+
376+
#### Windows settings:
377+
378+
* Example target on left arguments:
379+
```
380+
"targetFile.txt" "tempFile.txt"
381+
```
382+
* Example target on right arguments:
383+
```
384+
"tempFile.txt" "targetFile.txt"
385+
```
386+
* Scanned paths:
387+
* `%USERPROFILE%\.dotnet\tools\diffexcel.exe`
388+
* `%PATH%diffexcel.exe`
389+
390+
### [MsWordDiff](https://github.com/SimonCropp/MsOfficeDiff)
352391

353392
* Cost: Free
354393
* Is MDI: False

src/DiffEngine/Definitions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ static Definitions() =>
3030
Implementation.VisualStudioCode(),
3131
Implementation.Cursor(),
3232
Implementation.VisualStudio(),
33-
Implementation.MsWordDiff()
33+
Implementation.MsWordDiff(),
34+
Implementation.MsExcelDiff()
3435
];
3536
}

src/DiffEngine/DiffTool.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ public enum DiffTool
2525
VisualStudioCode,
2626
VisualStudio,
2727
Cursor,
28-
MsWordDiff
28+
MsWordDiff,
29+
MsExcelDiff
2930
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
static partial class Implementation
2+
{
3+
public static Definition MsExcelDiff()
4+
{
5+
var launchArguments = new LaunchArguments(
6+
Left: (temp, target) => $"\"{target}\" \"{temp}\"",
7+
Right: (temp, target) => $"\"{temp}\" \"{target}\"");
8+
9+
return new(
10+
Tool: DiffTool.MsExcelDiff,
11+
Url: "https://github.com/SimonCropp/MsOfficeDiff",
12+
AutoRefresh: false,
13+
IsMdi: false,
14+
SupportsText: false,
15+
RequiresTarget: true,
16+
BinaryExtensions:
17+
[
18+
".xlsx",
19+
".xls"
20+
],
21+
Cost: "Free",
22+
OsSupport: new(
23+
Windows: new(
24+
"diffexcel.exe",
25+
launchArguments,
26+
@"%USERPROFILE%\.dotnet\tools\")),
27+
UseShellExecute: false,
28+
CreateNoWindow: true,
29+
KillLockingProcess: true,
30+
Notes: """
31+
* Install via `dotnet tool install -g MsExcelDiff`
32+
* Requires Spreadsheet Compare (Office Professional Plus / Microsoft 365 Apps for Enterprise)
33+
* Uses Microsoft's Spreadsheet Compare to show differences between workbooks
34+
""");
35+
}
36+
}

src/DiffEngine/Implementation/MsWordDiff.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public static Definition MsWordDiff()
88

99
return new(
1010
Tool: DiffTool.MsWordDiff,
11-
Url: "https://github.com/SimonCropp/MsWordDiff",
11+
Url: "https://github.com/SimonCropp/MsOfficeDiff",
1212
AutoRefresh: false,
1313
IsMdi: false,
1414
SupportsText: false,

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project>
33
<PropertyGroup>
44
<NoWarn>CS1591;CS0649;NU1608;NU1109</NoWarn>
5-
<Version>19.0.0</Version>
5+
<Version>19.1.0</Version>
66
<AssemblyVersion>1.0.0</AssemblyVersion>
77
<PackageTags>Testing, Snapshot, Diff, Compare</PackageTags>
88
<Description>Launches diff tools based on file extensions. Designed to be consumed by snapshot testing libraries.</Description>

src/nuget.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ DiffEngine manages launching and cleanup of diff tools. It is designed to be use
1919

2020
[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=DiffEngine) is a major sponsor and is proud to contribute to the development this project.
2121

22-
[![Entity Framework Extensions](https://raw.githubusercontent.com/VerifyTests/DiffEngine/refs/heads/main/docs/zzz.png)](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=DiffEngine)<!-- endInclude -->
22+
[![Entity Framework Extensions](https://raw.githubusercontent.com/VerifyTests/DiffEngine/refs/heads/main/docs/zzz.png)](https://entityframework-extensions.net/?utm_source=simoncropp&utm_medium=DiffEngine)
23+
24+
### Developed using JetBrains IDEs
25+
26+
[![JetBrains logo.](https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.svg)](https://jb.gg/OpenSourceSupport)<!-- endInclude -->

0 commit comments

Comments
 (0)