Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
e04cc4f
Add support for reading threaded comments
Jul 1, 2020
3c7971e
- upgrade to DocumentFormat.OpenXml 2.11.3 => break tests
rominator1983 Nov 13, 2020
0024967
- no package url
rominator1983 Nov 19, 2020
65d4b9c
Load property "Modified" when loading workbook
rominator1983 Nov 19, 2020
e8b524e
- raised version
rominator1983 Nov 19, 2020
b00401c
Add breaking test for deleting note
rominator1983 Nov 20, 2020
809c385
considering options when checking for Empty cell #1575
rominator1983 Dec 7, 2020
3fcc4f8
add tests for XLCell.IsEmpty considering Contents-option #1575
rominator1983 Dec 7, 2020
ed96231
fix formatting
rominator1983 Dec 7, 2020
67b70d1
fix test #1575
rominator1983 Dec 7, 2020
7181789
- raised version
rominator1983 Dec 7, 2020
6a8010d
- reverted signing changes
rominator1983 Dec 7, 2020
a0a881b
- extended appveyor.yml
Feb 26, 2021
3eb582e
- changed packageId
Feb 26, 2021
aa72e8a
- Changed Author
Feb 26, 2021
cb03c3d
- Changed build version
Feb 26, 2021
240d080
- removed accidential 3 in version
Feb 26, 2021
933c583
Dropped scripted version scheme
stesee Feb 28, 2021
ecc7ec5
Dropped legacy build targets
stesee Feb 28, 2021
ae0b61d
Fixed appveyor build
stesee Feb 28, 2021
d2c6de3
Revert "Dropped legacy build targets"
seeste Mar 1, 2021
652ceb9
Rerverted DocumentFormat.OpenXml upgrade
seeste Mar 1, 2021
05d5db6
Update appveyor.yml
seeste Mar 1, 2021
57315e5
Added Space to test Appveyor Autobuild configuration
Mar 12, 2021
96c8b93
Disabled packaging for test and example projects
seeste Mar 12, 2021
f12f7de
Fixed artifact warning noise
seeste Mar 12, 2021
9115b7b
Enablet nuget.org publishing
seeste Mar 12, 2021
a476156
Merge branch 'develop' into NugetPublish
stesee Mar 12, 2021
a18b448
Merge pull request #2 from stesee/NugetPublish
stesee Mar 12, 2021
bb01eb0
Dropped net46 test target
seeste Mar 12, 2021
81a5a66
Added net461 target framework
seeste Mar 16, 2021
20f3316
Fixed build error
seeste Mar 16, 2021
676b45e
seems like net tests were and are broken... disabling for now
seeste Mar 16, 2021
a47f0e0
Added missing change of last commit, disabling .net 461 tests
seeste Mar 16, 2021
b2cfc49
Enabled assembly strong nameing
seeste Mar 16, 2021
4f14cdd
Symbols package publishing enabled
seeste Mar 16, 2021
e53223f
Bump DocumentFormat.OpenXml from 2.7.2 to 2.11.3
seeste Mar 16, 2021
a6f515a
Testing nuget symbol package without .net461
seeste Mar 16, 2021
0a6fb3e
Reenabled net461 targetFramework again
seeste Mar 16, 2021
96fb11f
Prepared package id rename
seeste Feb 8, 2022
d576df8
Upgraded to .net6.0
seeste Feb 11, 2022
1b3b6be
Enabling github actions
seeste Feb 11, 2022
8bbc3fd
Disabling ubuntu
seeste Feb 11, 2022
a62edfb
Update dotnet.yml
seeste Feb 11, 2022
f531fa8
Upgraded dependencies
seeste Feb 11, 2022
205b467
Marked some broken tests, caused by upgrades
seeste Feb 11, 2022
c9c89c7
Set GeneratePackageOnBuild true
seeste Feb 11, 2022
2996ebf
Fixing dotnet push windows specific path handling
seeste Feb 11, 2022
df23d3c
Upgraded dependencies
stesee Feb 11, 2022
2a44da3
Fixed github action publish step
seeste Feb 11, 2022
ee9740d
preparing obvious linux requirements
seeste Feb 11, 2022
de864d5
Integrated openxmlSdk changes
seeste Feb 14, 2022
388a7aa
Bumped DocumentFormat.OpenXml from 2.11.3 -> 2.15.0
stesee Feb 14, 2022
091a9e6
Fixing nuget.org checksum error
seeste Feb 14, 2022
4e3e3c1
Temporary enable pushing to nuget.org from branches != main
seeste Feb 14, 2022
72696ca
realy Temporary enable pushing to nuget.org from branches != main
seeste Feb 14, 2022
5b9a3e0
Falling back to embeded pdb
seeste Feb 14, 2022
64b0436
Referting temporary changes to analyze an error displayed by nuget.org
seeste Feb 14, 2022
e750f8c
Update ClosedXML.csproj
seeste Feb 15, 2022
a902989
Replaced usage of system.drawing with skiasharp
seeste Feb 15, 2022
2ecc727
Upstream changes
seeste Feb 15, 2022
54acce5
Fiddeling with skia dependencies
seeste Feb 15, 2022
1b18720
Added missing linux dependency
seeste Feb 15, 2022
9a30112
Updated expectation
seeste Feb 15, 2022
535d539
Adressing os specific line breaks
seeste Feb 15, 2022
d408026
Marked expectation to be windows specific
seeste Feb 15, 2022
1235ed6
Added wsl configuration
stesee Feb 16, 2022
1e182e9
Update StreamHelper.cs
stesee Feb 16, 2022
a07aca7
Allowing Os specific irrelevant diff
stesee Feb 16, 2022
e35982d
Enabled macos-latest
stesee Feb 16, 2022
fc7435d
Fixed test stage deployment
stesee Feb 16, 2022
e79fe4e
Merge pull request #13 from stesee/EnableMacOsInCi
stesee Feb 16, 2022
15671f9
Fixed review finding
seeste Feb 17, 2022
a203583
Merge branch 'LinuxSupport' into PublishSymbolFilesFix
stesee Feb 17, 2022
4da289d
Fixed broken sln file
seeste Feb 17, 2022
52849c6
Merge pull request #11 from stesee/PublishSymbolFilesFix
stesee Feb 17, 2022
750057e
Fixed review findings
seeste Feb 17, 2022
14c6b78
Fixed review findings and warnings
seeste Feb 17, 2022
e1aeb5f
Update XLAddress.cs
seeste Feb 17, 2022
3f2df05
Updated readme
seeste Feb 18, 2022
3b92722
.net 6.0 and linux support added
stesee Feb 18, 2022
c5a0086
Bump System.IO.Packaging from 4.0.5.0 to 6.0.0
dependabot[bot] Feb 18, 2022
211afed
make test agnostic of culture settings of developer machine
rominator1983 Dec 7, 2020
8507e16
Merge remote-tracking branch 'origin/main' into integrateUpstreamDevelop
rominator1983 Feb 18, 2022
e6bbabb
- fixing compilation
rominator1983 Feb 18, 2022
54ed5fe
- added missing test files
rominator1983 Feb 18, 2022
a7578e9
- fixed test
rominator1983 Feb 18, 2022
7262c60
- fixed test
rominator1983 Feb 18, 2022
e2aaf09
- fixed test
rominator1983 Feb 18, 2022
752b76a
- deactivated test and cleaned up code
rominator1983 Feb 18, 2022
ed1a41c
Implement MEDIAN function
jorgegiro Oct 7, 2021
aceca06
CodeMaid organised and cleaned
jorgegiro Oct 7, 2021
1474cdc
- not doing double conversion on array index
rominator1983 Feb 18, 2022
b57da61
Fix shape disappear if there was no image
adm90 Oct 6, 2021
2f1dd4a
- null handling as described in https://github.com/ClosedXML/ClosedXM…
rominator1983 Feb 18, 2022
11d95e8
Added reference, that is missing when used in .net4 consumers
seeste Feb 19, 2022
7698bb5
Aligned file format
seeste Feb 19, 2022
b2e64c2
Bump System.IO.Packaging from 4.0.5.0 to 6.0.0
stesee Feb 19, 2022
30af159
Merge pull request #21 from stesee/TextNullHandlingDuringLoad
rominator1983 Feb 21, 2022
6d867d9
Merge pull request #20 from stesee/1252_shape_bugfix
rominator1983 Feb 21, 2022
c1ac68f
Added support for MEDIAN function
rominator1983 Feb 21, 2022
9c6da40
Made Unit test culture agnostic
rominator1983 Feb 21, 2022
7efdce2
Merge remote-tracking branch 'origin/main' into integrateUpstreamDevelop
rominator1983 Feb 21, 2022
0cea0e2
- supporting strict mode a little bit more
rominator1983 Feb 21, 2022
52d154c
Integrated upstream develop changes. Added a little better support fo…
rominator1983 Feb 21, 2022
243786e
Update README.md
stesee Feb 21, 2022
2c61897
Update README.md
stesee Feb 21, 2022
8e5f299
Bump DocumentFormat.OpenXml from 2.15.0 to 2.16.0
dependabot[bot] Mar 15, 2022
1476bfe
Bumped actions/checkout@v2 to actions/checkout@v3
seeste Mar 16, 2022
73cc24f
Readme updated
stesee Mar 16, 2022
097d10d
Fixed nuget package version
seeste Mar 17, 2022
2e87ae7
Merge branch 'dependabot/nuget/DocumentFormat.OpenXml-2.16.0' of http…
seeste Mar 17, 2022
db6625c
Fixed package-ecosystem: "github-actions" setting in dependabot config
seeste Mar 17, 2022
abdeffc
Bump DocumentFormat.OpenXml from 2.15.0 to 2.16.0
stesee Mar 17, 2022
f5e5f3c
Bump actions/setup-dotnet from 1 to 2
dependabot[bot] Mar 17, 2022
ec7ff98
added test for input file provided in https://github.com/ClosedXML/Cl…
rominator1983 Mar 20, 2022
af343ec
Pivot Table custom captions GrandTotalCaption and DataCaption save+load
eagleoriginal Feb 20, 2022
56c6fa0
Pivot Table custom captions GrandTotalCaption and DataCaption Correct…
eagleoriginal Mar 18, 2022
86b9f88
- removed unneeded setters
rominator1983 Mar 25, 2022
687a37e
- added missing test for null values
rominator1983 Mar 25, 2022
934ee5c
- adapting to new MS Excel behavior that causes ClosedXml to not be a…
rominator1983 Mar 26, 2022
13c14b5
- adding save test and asserting for comment
rominator1983 Mar 26, 2022
01f877c
Fiddeling with absent secrets
stesee Mar 27, 2022
222625a
Update dotnet.yml
stesee Mar 27, 2022
436fd57
Update dotnet.yml
stesee Mar 27, 2022
6b7b0e6
Update dotnet.yml
stesee Mar 27, 2022
2110c4c
Made condition os agnostic
stesee Mar 27, 2022
aaa4e43
Fixes some warnings
stesee Mar 27, 2022
648c72c
Merge pull request #29 from stesee/main
stesee Mar 27, 2022
0003d69
Revert "Fixes some warnings"
stesee Mar 27, 2022
16cbe33
Applied working warning fixes
stesee Mar 27, 2022
187b13b
Bump actions/setup-dotnet from 1 to 2
stesee Mar 27, 2022
090f386
Merge pull request #25 from rominator1983/cellSetToTextAndNullFileCan…
stesee Mar 27, 2022
7efc3ed
Merge pull request #28 from stesee/LoadingCommentsEvenIfTextBoxElemen…
stesee Mar 27, 2022
c7a581e
Merge branch 'develop' into PivotTableCustomCaptionsGrandTotalCaption…
stesee Mar 27, 2022
240789f
Merge pull request #26 from stesee/PivotTableCustomCaptionsGrandTotal…
stesee Mar 27, 2022
4e83663
Merge pull request #30 from stesee/develop
stesee Mar 27, 2022
982e731
Removing Fody and Janitor.Fody by implementing Disposable pattern our…
rominator1983 Apr 11, 2022
958bfab
Publishing test files
seeste Apr 12, 2022
e6694eb
Fiddeling with pathes
seeste Apr 12, 2022
6052629
Using right github aciton to publish test outcome
seeste Apr 12, 2022
72c658f
Update dotnet.yml
seeste Apr 12, 2022
add3ffd
Migrated from embedded pdbs to sourcelink
seeste Apr 12, 2022
06c661a
Non Windows tests expectaion fix
stesee Apr 21, 2022
644085a
Merge pull request #34 from stesee/feature/RemoveFody
stesee Apr 21, 2022
503a0d8
Removing dependency on Fody and Janitor.Fody
rominator1983 Apr 22, 2022
27cff26
Migrated from embedded pdbs to sourcelink
rominator1983 Apr 22, 2022
9b0ef9f
Fixed missing dispose in XLPicture
seeste Apr 22, 2022
fde66ff
Fixed all Use language keywords instead of framework type names for t…
stesee Apr 23, 2022
bc31f4e
fixxed all "this and Me preferences (IDE0003 and IDE0009)"
stesee Apr 23, 2022
da7332b
fixed all "'var' preferences (IDE0007 and IDE0008)"
stesee Apr 23, 2022
80a52fb
Fixed all "Simplify name (IDE0001)"
stesee Apr 23, 2022
9cc2636
Fixed all "Use object initializers (IDE0017)"
stesee Apr 23, 2022
78bb508
Fixed all "Use simple 'using' statement (IDE0063)"
stesee Apr 23, 2022
96ff00f
Fixed all "Use is null check (IDE0041)"
stesee Apr 23, 2022
d3793f6
Fixxed more warnings (IDE0044 IDE0038 IDE0031 IDE0039 IDE0019 IDE000…
stesee Apr 23, 2022
808a686
IDE0002 IDE0047 IDE0054
stesee Apr 23, 2022
6c90119
Addressed review findings
seeste Apr 25, 2022
d09e3ca
Added missing dispose in XLPicture
stesee Apr 25, 2022
8ca1a5f
Merge pull request #36 from stesee/main
stesee Apr 26, 2022
7998ec4
Fixed "Add braces (IDE0011)" warning
seeste Apr 27, 2022
76c354f
Fixed "S3928 Parameter names used into ArgumentException constructors…
seeste Apr 27, 2022
6759770
Fixed false positive S1144 Warning
seeste Apr 27, 2022
9012537
Fixed IDE0044 warnings
seeste Apr 27, 2022
9a10ff3
Fixed IDE0028
seeste Apr 27, 2022
4b9c6a9
Fixed redundant array type definition
seeste Apr 27, 2022
fa71a5a
Fixed all IDE0130
seeste Apr 27, 2022
aaf9d29
Fixed Remove initilization with default value
seeste Apr 27, 2022
6adef31
Fixed more compiler warnings
seeste Apr 27, 2022
95646d9
Fixed CA1829
seeste Apr 27, 2022
528d408
Dropped redundant parentheses.
seeste Apr 27, 2022
b1a2784
Fixed some warnings
seeste Apr 27, 2022
698c9a8
Update TextTests.cs
seeste Apr 27, 2022
f0cef6a
Fixed issues found by codacy/sonar
seeste Apr 27, 2022
0047861
Remove the unused local variable 'cell'.
seeste Apr 27, 2022
0dd2031
Some warnings (Compiler and Sonar) fixed
stesee Apr 27, 2022
9c42b08
Adressing font width and height issues
seeste Jun 8, 2022
8151be2
adjusted cell height depends on fonts available on the test system
seeste Jun 9, 2022
dd8bec9
Fixed more column size adjusting issues
seeste Jun 12, 2022
02ccd90
Merge branch 'develop' into FixedFontMeasureCode
seeste Jun 12, 2022
cec1b61
Added self calibration to FontBaseExtensions width calculator
seeste Jun 12, 2022
9c5fdd6
Added self calibration to FontBaseExtensions height calculator
seeste Jun 12, 2022
6d5e349
Update AdjustToContents.xlsx
seeste Jun 12, 2022
0bfaddb
Reverted change "room for arrow"
seeste Jun 12, 2022
634a317
Fixed some code warings
seeste Jun 12, 2022
7dab773
Aligned editorconfig with exisiting code
stesee Jun 19, 2022
e65d4b6
Fixed some ide0005
stesee Jun 19, 2022
73f41d8
Review findings addressed
seeste Jun 20, 2022
c20fafe
Merge pull request #41 from stesee/FixedFontMeasureCode
stesee Jun 20, 2022
e070e27
Merge pull request #42 from stesee/WarningsFixed
rominator1983 Jun 20, 2022
8e5236d
Merge pull request #43 from stesee/main
stesee Jun 29, 2022
83fdc38
Bumped DocumentFormat.OpenXml 2.16.0 -> 2.17.1
seeste Aug 17, 2022
d37bd3f
Completed unfinished fork description.
seeste Aug 17, 2022
03393db
Moving from "Verdana" to "DejaVu Serif"
seeste Aug 17, 2022
e5aaf2a
Increasing boundaries to keep MacOS tested
seeste Aug 17, 2022
fe62d72
Updated expectation
stesee Aug 17, 2022
bdab36f
Updated expectation
stesee Aug 17, 2022
d7732cb
Limit cell size adjustment to one digit after coma
stesee Aug 20, 2022
432deac
Moved cell size adjustment rounding to the right location
stesee Aug 20, 2022
4be609f
Update DefiningRanges.xlsx
stesee Aug 20, 2022
8399d3d
Fiddeling with machine specific behavior
stesee Sep 6, 2022
9c2ac0e
Reverted attempt to cope with openxmlsdk behavior that causes roundin…
stesee Sep 6, 2022
f7b8142
Update FontBaseExtensionsTests.cs
stesee Sep 6, 2022
e8ca3fd
Update FontBaseExtensionsTests.cs
stesee Sep 6, 2022
116f217
Embedded DejaVuSerif
stesee Sep 6, 2022
c1c78f4
Merge pull request #46 from stesee/FontSizeInterOsReliabilityExperiment
stesee Sep 6, 2022
04b95e6
Update CONTRIBUTING.md
stesee Sep 7, 2022
ab5af4d
Bumped DocumentFormat.OpenXml 2.16.0 -> 2.17.1
stesee Sep 7, 2022
137c9dc
Update README.md
stesee Sep 7, 2022
5da30bd
Bumped DocumentFormat.OpenXml from 2.17.1 to 2.18.0
seeste Sep 7, 2022
1ee2ad0
Bumped DocumentFormat.OpenXml from 2.17.1 to 2.18.0
stesee Sep 7, 2022
321d1e3
Bump actions/setup-dotnet from 2 to 3
dependabot[bot] Oct 4, 2022
dad9168
Updated PackageProjectUrl and RepositoryUrl to rubicon-oss
seeste Oct 5, 2022
c266ede
Publish to nuget.org gets triggerd on merging into release branch
seeste Oct 5, 2022
d3a05de
Merge pull request #1 from rubicon-oss/dependabot/github_actions/acti…
seeste Oct 5, 2022
97dd6e0
Update dotnet.yml
seeste Oct 5, 2022
5f8c80c
Merge branch 'develop' of https://github.com/rubicon-oss/DocumentPart…
seeste Oct 5, 2022
440f378
Updated github action badge
seeste Oct 5, 2022
0216c21
Removed prerelease suffix in nuget version
seeste Oct 7, 2022
981a19f
Merge pull request #4 from rubicon-oss/BadgeUpdate
rominator1983 Nov 14, 2022
aa82469
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1,080 changes: 1,072 additions & 8 deletions .editorconfig

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
rebase-strategy: auto

- package-ecosystem: "nuget" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
ignore:
- dependency-name: "NUnit"
- dependency-name: "NUnit3TestAdapter"
- dependency-name: "SonarAnalyzer.CSharp"
- dependency-name: "morelinq"
- dependency-name: "Microsoft.NET.Test.Sdk"

87 changes: 87 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: .NET build and test
env:
CURRENT_VERSION: 0.96.${{ github.run_number }}
LAST_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}

on:
push:
pull_request:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release
- name: Publish Unit Test Results
uses: actions/upload-artifact@v3
if: failure()
with:
name: TestResult
path: "TestResult/**/*"

deployRelease:
if: github.ref == 'refs/heads/release'
runs-on: windows-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: NugetPush
env:
NUGET_TOKEN_EXISTS: ${{ secrets.NUGET_TOKEN }}
if: env.NUGET_TOKEN_EXISTS != ''
run: |
ls ./ClosedXML/bin/Release
dotnet nuget push .\ClosedXML\bin\Release\*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TOKEN}} --source https://api.nuget.org/v3/index.json
- name: GithubReleasesPush
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ env.CURRENT_VERSION }}
prerelease: false
title: "Release Build ${{ env.CURRENT_VERSION }}"
files: |
./ClosedXML/bin/Release/*.nupkg
./ClosedXML/bin/Release/*.snupkg

deployTest:
if: github.ref == 'refs/heads/develop'
runs-on: windows-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: NugetPush
env:
NUGET_TOKEN_EXISTS: ${{ secrets.NUGET_TEST_TOKEN }}
if: env.NUGET_TOKEN_EXISTS != ''
run: |
ls ./ClosedXML/bin/Release
dotnet nuget push .\ClosedXML\bin\Release\*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TEST_TOKEN}} --source https://apiint.nugettest.org/v3/index.json
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"ms-dotnettools.csharp"
]
}
27 changes: 27 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/OpenXmlToHtmlTests/bin/Debug/netcoreapp3.1/OpenXmlToHtmlTests.dll",
"args": [],
"cwd": "${workspaceFolder}/OpenXmlToHtmlTests",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": true
}
15 changes: 15 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "update nuget",
"command": "${workspaceFolder}/.vscode/updateNuget.sh",
"args": [],
"group": "build",
"presentation": {
"reveal": "always"
},
"problemMatcher": "$msCompile"
}
]
}
13 changes: 13 additions & 0 deletions .vscode/updateNuget.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
regex='PackageReference Include="([^"]*)" Version="([^"]*)"'
find . -name "*.*proj" | while read proj; do
while read line; do
if [[ $line =~ $regex ]]; then
name="${BASH_REMATCH[1]}"
version="${BASH_REMATCH[2]}"
if [[ $version != *-* ]]; then
dotnet add "$proj" package "$name"
fi
fi
done <"$proj"
done
61 changes: 45 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Developer guidelines

The [OpenXML specification](https://www.ecma-international.org/publications/standards/Ecma-376.htm) is a large and complicated beast. In order for ClosedXML, the wrapper around OpenXML, to support all the features, we rely on community contributions. Before opening an issue to request a new feature, we'd like to urge you to try to implement it yourself and log a pull request.

Here are some tips.

* Before starting a large pull request, log an issue and outline the problem and a broad outline of your solution. The maintainers will discuss the issue with you and possibly propose some alternative approaches to align with the ClosedXML development conventions.
* Before starting a large pull request, log an issue and outline the problem and a broad outline of your solution. The maintainers will discuss the issue with you and possibly propose some alternative approaches to align with the ClosedXML development conventions.
* Please submit pull requests that are based on the `develop` branch.
* Where possible, pull requests should include unit tests that cover as many uses cases as possible.
* We recommend Visual Studio 2019 or higher as the development environment. If you do use Visual Studio, please install these extensions:
* [CodeMaid](https://marketplace.visualstudio.com/items?itemName=SteveCadwallader.CodeMaid), for ensuring consistent code syntax, whitespace convention, etc.
* If you use a version of Visual Studio lower than 2017, you should install [editorconfig](<https://marketplace.visualstudio.com/items?itemName=EditorConfigTeam.EditorConfig>) support. Read more about [EditorConfig](http://www.editorconfig.org).
* We use 4 spaces for code indentation. This is the default in Visual Studio. Don't leave any trailing white space at the end of lines or files.



## Working with Excel file internals
Excel files (`.xlsx` and `.xlsm`) are zip packages. You can easily verify this by renaming the extension any Excel file to `.zip` and opening the file in your favourite `.zip` file editor.

Excel files (`.xlsx` and `.xlsm`) are zip packages. You can easily verify this by renaming the extension any Excel file to `.zip` and opening the file in your favorite `.zip` file editor.

Internally, the file contains files (also known as parts) that represent different entities in the Excel framework, for example `workbook.xml` and `table1.xml`. The [OpenXML specification](https://www.ecma-international.org/publications/standards/Ecma-376.htm) documents all these parts and their contents.

Expand All @@ -24,24 +24,53 @@ Making changes to the ClosedXML code may change the input or output of the packa

A ClosedXML developer will often want to compare the internals of 2 similar Excel files. For example if you want to compare the output of a specific package part before and after your code changes. The long, difficult way would be to extract the package parts of the 2 files and manually compare the relevant parts. To ease this, we recommend this tooling stack:

- [Total Commander](https://www.ghisler.com/download.htm)
- [WinMerge](http://winmerge.org/downloads) version `2.14.0`, because subsequent versions for [some reason](https://bitbucket.org/winmerge/winmerge/issues/152/displayxmlfiles-plugin-not-included-with) excludes the required `DisplayXMLFiles.dll` plugin.
- Set Total Commander [to use WinMerge](https://superuser.com/questions/238039/can-i-replace-internal-diff-in-total-commander-with-a-custom-tool) as its compare tool.
- In WinMerge, enable `Plugins > Automatic Prediffer`
* [Total Commander](https://www.ghisler.com/download.htm)
* [WinMerge](http://winmerge.org/downloads) version `2.14.0`, because subsequent versions for [some reason](https://bitbucket.org/winmerge/winmerge/issues/152/displayxmlfiles-plugin-not-included-with) excludes the required `DisplayXMLFiles.dll` plugin.
* Set Total Commander [to use WinMerge](https://superuser.com/questions/238039/can-i-replace-internal-diff-in-total-commander-with-a-custom-tool) as its compare tool.
* In WinMerge, enable `Plugins > Automatic Prediffer`

Now, to compare 2 similar, but not exact Excel files:

- In Total Commander, navigate to the 1st file in the left-hand pane and the 2nd file in the right-hand pane.
- Press `Ctrl+PageDown` to "enter" the package. You should see, among others, a `[Content_Types].xml` file in both panes.
- You can now compare all package parts by selecting `Commands > Synchronise Dirs...`. Press `Compare`. This will do a full, recursive comparison. You can filter out parts that are identical.
- You can select an item that differs and press `Ctrl+F3` to open the two parts in WinMerge and see the exact comparison of the part's contents. The XML files should automatically reformat/reindent to ease the comparison instead of showing the entire XML contents on a single line. This is the reason for requiring the `DisplayXMLFiles.dll` plugin.
- In Total Commander, you can also navigate to specific files in the left-hand and right-hand panes and select `File > Compare by Content...`. This will open WinMerge directly.
- Note that since WinMerge reformats the XML, it does so in a temporary file. If you make changes to the contents of any of the 2 panes in WinMerge and save the file, it will not be saved back into the Excel file.
* In Total Commander, navigate to the 1st file in the left-hand pane and the 2nd file in the right-hand pane.
* Press `Ctrl+PageDown` to "enter" the package. You should see, among others, a `[Content_Types].xml` file in both panes.
* You can now compare all package parts by selecting `Commands > Synchronize Dirs...`. Press `Compare`. This will do a full, recursive comparison. You can filter out parts that are identical.
* You can select an item that differs and press `Ctrl+F3` to open the two parts in WinMerge and see the exact comparison of the part's contents. The XML files should automatically reformat/reindent to ease the comparison instead of showing the entire XML contents on a single line. This is the reason for requiring the `DisplayXMLFiles.dll` plugin.
* In Total Commander, you can also navigate to specific files in the left-hand and right-hand panes and select `File > Compare by Content...`. This will open WinMerge directly.
* Note that since WinMerge reformats the XML, it does so in a temporary file. If you make changes to the contents of any of the 2 panes in WinMerge and save the file, it will not be saved back into the Excel file.

#### Scripted diff preperation

Powershell script to recursive extract and delete every xlsx in a directory.

``` Powershell
foreach ($file in Get-ChildItem -Recurse -Filter *.xlsx)
{
cp "$($file.FullName)" "$($file.FullName).zip"
Expand-Archive "$($file.FullName).zip" -DestinationPath "$($file.FullName).unzipped"
rm "$($file.FullName).zip"
rm "$($file.FullName)"
}
```

Commands to remove irrelevant XML format before comparing

``` npm
npm install -g prettier
npm install -g prettier @prettier/plugin-xml
prettier --write '**/*.xml'
```

On windows you can call winmerge using

``` powershell
& "C:\Program Files\WinMerge\WinMergeU.exe" .\Actual\ .\Expected\
```

## Code conventions

ClosedXML has a fairly large codebase and we therefore want to keep code revisions as clean and tidy as possible. It is therefore important not to introduce unnecessary whitespace changes in your commits.

To ensure you follow the coding conventions, please do the following steps before you commit your code:

- In Visual Studio, run `CodeMaid > Cleanup Active Document` or `Ctrl+M, Space` on each file that you have altered. This will ensure the correct whitespace consistency.
- Some files, not all, have a header in the first line: `// Keep this file CodeMaid organised and cleaned`. For these files, also run `CodeMaid > Reorganize Active Document` or `Ctrl+M, Z`. This will reorder properties and methods alphabetically into a predetermined order. For example, public properties and methods will be organized before private properties and methods. Not all files require this yet. Please take note of the headers.
* In Visual Studio, run `CodeMaid > Cleanup Active Document` or `Ctrl+M, Space` on each file that you have altered. This will ensure the correct whitespace consistency.
* Some files, not all, have a header in the first line: `// Keep this file CodeMaid organized and cleaned`. For these files, also run `CodeMaid > Reorganize Active Document` or `Ctrl+M, Z`. This will reorder properties and methods alphabetically into a predetermined order. For example, public properties and methods will be organized before private properties and methods. Not all files require this yet. Please take note of the headers.
5 changes: 5 additions & 0 deletions ClosedXML.Examples/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# C# files
[*.cs]

# S1481: Unused local variables should be removed
dotnet_diagnostic.S1481.severity = none
Loading