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
3 changes: 3 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Code of Conduct

MiniExcel is part of the [.NET Foundation](https://dotnetfoundation.org/), and we ask our contributors to abide by their [Code of Conduct](https://www.dotnetfoundation.org/code-of-conduct).
52 changes: 52 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Contributing to MiniExcel

Thank you for your enthusiasm and generosity in wanting to contribute to the project!

We kindly ask you to follow the guidelines hereby specified.

## Reporting an issue

Bugs are tracked via [GitHub issues](https://github.com/mini-software/miniexcel/issues/).
The issue template will help you on the way to create a new one:

* Create an issue via the [issues list](https://github.com/mini-software/miniexcel/issues/new?template=bug_report.md)
* Include the versions of MiniExcel that are affected
* Specify the target framework and operating system
* Describe the differences between the expected behaviour and the actual behaviour
* Provide a minimum code sample that reproduces the issue

## Requesting a feature/enhancement

Similarly, feature requests are also tracked via [GitHub](https://github.com/mini-software/miniexcel/issues/) issues.
The issue template will help you on the way once again:

* Create an issue via the [issues list](https://github.com/mini-software/MiniExcel/issues/new?template=feature_request.md)
* Explain your motivations for the feature to be included
* Describe how the feature would work
* Include workarounds where applicable

## Making a PR

**Please do not open a PR that does not reference an issue**.
* If an issue does not already exist please create one via the issues list
* Fork the repository and create a branch with a descriptive name
* Attempt to make commits of logical units
* Verify the solution builds successfully and all tests pass
* Create the PR making sure:
* It references the issue addressed by the PR
* Unit tests for the changes have been added
* Documentation has been updated where necessary

## AI Usage

The use of AI agents is allowed for generating bugfixes, unit tests and documentation.
Please make sure to review all AI contributions submitted on your behalf.

We kindly ask you to refrain from using AI to generate new features,
as it becomes increasingly difficult and time-consuming for the maintainers to review them, integrate them appropriately into the codebase, and ultimately maintain them indefinitely.

## Questions?

Feel free to open a discussion or contact the maintainers directly via email if you have further inquiries.
Comment thread
michelebastione marked this conversation as resolved.

Finally, when contributing please keep in mind our [Code of Conduct](CODE_OF_CONDUCT.md).
12 changes: 10 additions & 2 deletions MiniExcel.slnx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<Solution>

<Folder Name="/benchmarks/">
<Project Path="benchmarks\MiniExcel.Benchmarks\MiniExcel.Benchmarks.csproj" />
</Folder>

<Folder Name="/Docs and settings/">
<File Path=".editorconfig" />
<File Path=".gitattributes" />
Expand All @@ -11,18 +13,22 @@
<File Path="LICENSE" />
<File Path="README.md" />
<File Path="README.zh-CN.md" />
<File Path="README_V2.md" />
<File Path="V2-Upgrade-Notes.md" />
<File Path="CODE_OF_CONDUCT.md" />
<File Path="CONTRIBUTING.md" />
<File Path=".github\workflows\benchmark.yml" />
<File Path=".github\workflows\codeql-analysis.yml" />
<File Path="README-V2.md" />
<File Path="miniexcel.publickey" />
<File Path="src\icon.png" />
<File Path="V2-Upgrade-Notes.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/">
<File Path="src/.editorconfig" />
<File Path="src\Directory.Build.props" />
Expand All @@ -33,9 +39,11 @@
<Project Path="src/MiniExcel.OpenXml.FluentMapping/MiniExcel.OpenXml.FluentMapping.csproj" />
<Project Path="src\MiniExcel\MiniExcel.csproj" />
</Folder>

<Folder Name="/tests/">
<Project Path="tests/MiniExcel.Csv.Tests/MiniExcel.Csv.Tests.csproj" />
<Project Path="tests/MiniExcel.OpenXml.Tests/MiniExcel.OpenXml.Tests.csproj" />
<Project Path="tests/MiniExcel.Tests.Common/MiniExcel.Tests.Common.csproj" />
</Folder>

</Solution>
28 changes: 14 additions & 14 deletions README-V2.md → README_V2.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ await exporter.ExportAsync(outputPath, values);

### Release Notes

If you're migrating from a `1.x` version, please check the [upgrade notes](V2-upgrade-notes.md).
If you're migrating from a `1.x` version, please check the [upgrade notes](V2-Upgrade-Notes.md).

You can check the full release notes [here](docs).

Expand All @@ -208,12 +208,12 @@ Check what we are planning for future versions [here](https://github.com/mini-so

The code for the benchmarks can be found in [MiniExcel.Benchmarks](benchmarks/MiniExcel.Benchmarks/Program.cs).

The main file used to test performance is [**Test100,000x10.xlsx**](benchmarks/MiniExcel.Benchmarks/Test1%2C000%2C000x10.xlsx), a document containing 100,000 rows * 10 columns whose cells are filled with unique strings.
The main file used to test performance is [**Test100,000x10.xlsx**](benchmarks/MiniExcel.Benchmarks/Test100%2C000x10.xlsx), a document containing 100,000 rows * 10 columns whose cells are filled with unique strings.

To run all the benchmarks use:

```bash
dotnet run -project .\benchmarks\MiniExcel.Benchmarks -c Release -f net9.0 -filter * --join
dotnet run --project .\benchmarks\MiniExcel.Benchmarks -c Release -f net9.0 -filter "*" --join
Comment thread
michelebastione marked this conversation as resolved.
```

You can find the benchmarks' results for the latest release [here](benchmarks/results).
Expand Down Expand Up @@ -385,7 +385,7 @@ Under the hood the dynamic objects returned in a query are implemented using `Ex
making it possible to cast them to `IDictionary<string,object>`:

```csharp
var excelimporter = MiniExcel.Importers.GetOpenXmlImporter();
var excelImporter = MiniExcel.Importers.GetOpenXmlImporter();

var rows = excelImporter.Query(path).Cast<IDictionary<string,object>>();

Expand Down Expand Up @@ -509,7 +509,7 @@ exporter.Export(path, values);

```csharp
var exporter = MiniExcel.Exporters.GetOpenXmlExporter();
List<Dictionary<string, object>>() values =
List<Dictionary<string, object>> values =
[
new() { { "Column1", "MiniExcel" }, { "Column2", 1 } },
new() { { "Column1", "Github" }, { "Column2", 2 } }
Expand Down Expand Up @@ -567,7 +567,7 @@ using var connection = YourDbConnection();

var cmd = new CommandDefinition(
"SELECT 'MiniExcel' AS Column1, 1 as Column2 UNION ALL SELECT 'Github', 2",
flags: CommandFlags.NoCache)
flags: CommandFlags.NoCache
);

// Note: QueryAsync will throw a closed connection exception
Expand Down Expand Up @@ -716,7 +716,7 @@ Dictionary<string, object?>[] value =
];

var exporter = MiniExcel.Exporters.GetOpenXmlExporter();
exporter.Export("test.xlsx", value, configuration: config);
exporter.Export("test.xlsx", value);
```

![image](https://user-images.githubusercontent.com/31481586/241419455-3c0aec8a-4e5f-4d83-b7ec-6572124c165d.png)
Expand Down Expand Up @@ -1149,7 +1149,7 @@ var config = new OpenXmlConfiguration
};

var templater = MiniExcel.Templaters.GetOpenXmlTemplater();
templater.ApplyTemplate(path, templatePath, value, config)
templater.ApplyTemplate(path, templatePath, value, config);
```

![image](https://user-images.githubusercontent.com/12729184/157464332-e316f829-54aa-4c84-a5aa-9aef337b668d.png)
Expand Down Expand Up @@ -1252,11 +1252,11 @@ public class Dto
public DateTime InDate { get; set; }
}

var value = new Dto[]
{
new Issue241Dto{ Name = "Jack", InDate = new DateTime(2021, 01, 04) },
new Issue241Dto{ Name = "Henry", InDate = new DateTime(2020, 04, 05) }
};
Dto[] value =
[
new() { Name = "Jack", InDate = new DateTime(2021, 01, 04) },
new() { Name = "Henry", InDate = new DateTime(2020, 04, 05) }
];

var exporter = MiniExcel.Exporters.GetOpenXmlExporter();
exporter.Export(path, value);
Expand Down Expand Up @@ -1589,7 +1589,7 @@ var config = new CsvConfiguration
.ToArray()
};

var importer = MiniExcel.Exporters.GetCsvImporter();
var importer = MiniExcel.Importers.GetCsvImporter();
var rows = importer.Query(path, configuration: config).ToList();
```

Expand Down
Loading