Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
working-directory: ./benchmarks/MiniExcel.Benchmarks
- name: Build
run: dotnet build --no-restore
working-directory: ./benchmarks/MiniExcel.Benchmarks
- name: Benchmark
run: dotnet run -c Release -f net9.0
run: dotnet run -c Release -f net10.0
working-directory: ./benchmarks/MiniExcel.Benchmarks
env:
BenchmarkMode: Automatic
Expand All @@ -47,15 +47,15 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
working-directory: ./benchmarks/MiniExcel.Benchmarks
- name: Build
run: dotnet build --no-restore
working-directory: ./benchmarks/MiniExcel.Benchmarks
- name: Benchmark
run: dotnet run -c Release -f net9.0
run: dotnet run -c Release -f net10.0
working-directory: ./benchmarks/MiniExcel.Benchmarks
env:
BenchmarkMode: Automatic
Expand All @@ -77,15 +77,15 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
working-directory: ./benchmarks/MiniExcel.Benchmarks
- name: Build
run: dotnet build --no-restore
working-directory: ./benchmarks/MiniExcel.Benchmarks
- name: Benchmark
run: dotnet run -c Release -f net9.0
run: dotnet run -c Release -f net10.0
working-directory: ./benchmarks/MiniExcel.Benchmarks
env:
BenchmarkMode: Automatic
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [ v1.x-maintenance ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ v1.x-maintenance ]
schedule:
- cron: '18 0 * * 0'

Expand All @@ -40,10 +40,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup .NET 9
uses: actions/setup-dotnet@v1
- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -57,8 +57,8 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# - name: Autobuild
# uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,9 +67,8 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Manual build
run: dotnet build MiniExcel.slnx -c Release -f net10.0

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
6 changes: 5 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- v1.x-maintenance

jobs:
build:
Expand All @@ -21,6 +21,10 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
env:
Expand Down
70 changes: 0 additions & 70 deletions MiniExcel.sln

This file was deleted.

29 changes: 29 additions & 0 deletions MiniExcel.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Solution>
<Folder Name="/benchmarks/">
<Project Path="benchmarks/MiniExcel.Benchmarks/MiniExcel.Benchmarks.csproj" />
</Folder>
<Folder Name="/Docs and setting/">
<File Path=".gitattributes" />
<File Path=".github/workflows/benchmark.yml" />
<File Path=".github/workflows/codeql-analysis.yml" />
<File Path=".github/workflows/dotnet.yml" />
<File Path=".gitignore" />
<File Path="appveyor.yml" />
<File Path="LICENSE" />
<File Path="README-NuGet.md" />
<File Path="README.md" />
<File Path="README.zh-CN.md" />
<File Path="README.zh-Hant.md" />
</Folder>
<Folder Name="/Releases/">
<File Path="docs/README.md" />
<File Path="docs/README.zh-CN.md" />
<File Path="docs/README.zh-Hant.md" />
</Folder>
<Folder Name="/src/">
<Project Path="src/MiniExcel/MiniExcelLibs.csproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="tests/MiniExcelTests/MiniExcelTests.csproj" />
</Folder>
</Solution>
4 changes: 2 additions & 2 deletions benchmarks/MiniExcel.Benchmarks/MiniExcel.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
Expand All @@ -16,7 +16,7 @@
<PackageReference Include="DocumentFormat.OpenXml" Version="3.3.0" />
<PackageReference Include="EPPlus" Version="7.7.2" />
<PackageReference Include="ExcelDataReader" Version="3.7.0" />
<PackageReference Include="NPOI" Version="2.7.3" />
<PackageReference Include="NPOI" Version="2.7.5" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/MiniExcel/MiniExcelLibs.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net45;netstandard2.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net45;netstandard2.0;net8.0;net9.0;net10.0</TargetFrameworks>
<Version>1.41.4</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
Expand Down Expand Up @@ -50,9 +50,9 @@ Todo : https://github.com/mini-software/MiniExcel/projects/1?fullscreen=true</De
<None Include="..\..\README-NuGet.md" Link="README.md" Pack="true" PackagePath="README.md" />
</ItemGroup>
<ItemGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.0" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions tests/MiniExcelTests/MiniExcelIssueAsyncTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,11 @@
var sheets = new DataSet();

var users = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(new[] { new { Name = "Jack", Age = 25 }, new { Name = "Mike", Age = 44 } }));
users.TableName = "users";

Check warning on line 362 in tests/MiniExcelTests/MiniExcelIssueAsyncTests.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Dereference of a possibly null reference.

Check warning on line 362 in tests/MiniExcelTests/MiniExcelIssueAsyncTests.cs

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.
sheets.Tables.Add(users);

var department = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(new[] { new { ID = "01", Name = "HR" }, new { ID = "02", Name = "IT" } }));
department.TableName = "department";

Check warning on line 366 in tests/MiniExcelTests/MiniExcelIssueAsyncTests.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Dereference of a possibly null reference.

Check warning on line 366 in tests/MiniExcelTests/MiniExcelIssueAsyncTests.cs

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.
sheets.Tables.Add(department);

var rowsWritten = await MiniExcel.SaveAsAsync(path, sheets);
Expand Down Expand Up @@ -1324,15 +1324,15 @@
Assert.Equal("MyProperty5", rows[0].C);
Assert.Equal("MyProperty2", rows[0].D);
Assert.Equal("MyProperty6", rows[0].E);
Assert.Equal(null, rows[0].F);
Assert.Null(rows[0].F);
Assert.Equal("MyProperty3", rows[0].G);

Assert.Equal("MyProperty4", rows[0].A);
Assert.Equal("CustomColumnName", rows[0].B); //note
Assert.Equal("MyProperty5", rows[0].C);
Assert.Equal("MyProperty2", rows[0].D);
Assert.Equal("MyProperty6", rows[0].E);
Assert.Equal(null, rows[0].F);
Assert.Null(rows[0].F);
Assert.Equal("MyProperty3", rows[0].G);
}

Expand Down
12 changes: 6 additions & 6 deletions tests/MiniExcelTests/MiniExcelIssueTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@
var sheets = MiniExcel.GetSheetNames(path);
foreach (var sheetName in sheets)
{
var dt = MiniExcel.QueryAsDataTable(path, useHeaderRow: true, sheetName: sheetName, configuration: config);

Check warning on line 408 in tests/MiniExcelTests/MiniExcelIssueTests.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

'MiniExcel.QueryAsDataTable(string, bool, string, ExcelType, string, IConfiguration)' is obsolete: 'QueryAsDataTable is not recommended, because it'll load all data into memory.'
}
}

Expand Down Expand Up @@ -3067,15 +3067,15 @@
Assert.Equal("MyProperty5", rows[0].C);
Assert.Equal("MyProperty2", rows[0].D);
Assert.Equal("MyProperty6", rows[0].E);
Assert.Equal(null, rows[0].F);
Assert.Null(rows[0].F);
Assert.Equal("MyProperty3", rows[0].G);

Assert.Equal("MyProperty4", rows[0].A);
Assert.Equal("CustomColumnName", rows[0].B);
Assert.Equal("MyProperty5", rows[0].C);
Assert.Equal("MyProperty2", rows[0].D);
Assert.Equal("MyProperty6", rows[0].E);
Assert.Equal(null, rows[0].F);
Assert.Null(rows[0].F);
Assert.Equal("MyProperty3", rows[0].G);
}

Expand Down Expand Up @@ -4235,7 +4235,7 @@
var path = PathHelper.GetFile("xlsx/TestIssue763.xlsx");
var rows = MiniExcel.QueryRange(path, startCell: "A3", endCell: "J3").ToArray();
Assert.Equal("A3", rows[0].A);
Assert.Equal(null, rows[0].J);
Assert.Null(rows[0].J);
}

/// <summary>
Expand Down Expand Up @@ -4330,8 +4330,8 @@
var rows = MiniExcel.Query(path.FilePath).ToList();

Assert.Equal("2025-1", rows[2].B);
Assert.Equal(null, rows[3].B);
Assert.Equal(null, rows[4].B);
Assert.Null(rows[3].B);
Assert.Null(rows[4].B);
Assert.Equal("2025-2", rows[5].B);
return;

Expand Down Expand Up @@ -4658,7 +4658,7 @@
var rows = MiniExcel.Query(path).ToList();

Assert.Equal(3, rows.Count);
Assert.Equal(null, rows[0].A);
Assert.Null(rows[0].A);
Assert.Equal(2, rows[2].B);
}

Expand Down
Loading
Loading