Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API.

License

NotificationsYou must be signed in to change notification settings

ClosedXML/ClosedXML

Repository files navigation

ClosedXML

ReleaseNuGet version (ClosedXML).NET Framework.NET StandardBuild statusOpen Source Helpers

💾 Download unstable CI build

ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlyingOpenXML API.

For more information seethe documentation orthe wiki.

Release notes & migration guide

The public API is still not stable and it is a very good idea toread release notes andmigration guide before each update.

Performance

Performance matters mostly for large files. For small files, few ms here or there doesn't matter. The presented data are from generally develop branch (currently0.103-beta).

Runtime details```BenchmarkDotNet v0.13.8, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2)AMD Ryzen 5 5500U with Radeon Graphics, 1 CPU, 12 logical and 6 physical cores.NET SDK 8.0.100-rc.1.23463.5 [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2```

Save

DescriptionRowsColumnsTime/Memory to insert dataSave workbookTotal time/memory
Mixed (text/number) workbook.
Gist
250 000151.619 sec / 117 MiB6.343 sec7.962 sec / 477 MiB
Text only workbook.Gist1 000 000106.302 sec / 402 MiB17.134 sec23.436 sec / 1880 MiB

Load

DescriptionRowsColumnsTime to load dataUsed memory
Load mixed workbook (10 text/5 number columns).250 0001515.648 sec236 MiB
Text only workbook.1 000 0001049.046 sec801 MiB

Load tests used files created during save test.

Frequent answers

  • If you get an exceptionUnable to find font font name or fallback font fallback font name. Install missing fonts or specify a different fallback font through ‘LoadOptions.DefaultGraphicEngine = new DefaultGraphicEngine(“Fallback font name”)’, see help page aboutmissing fonts.
  • ClosedXML is not thread-safe. There is no guarantee thatparallel operations will work. The underlying OpenXML library is also not thread-safe.
  • If you get an exceptionThe type initializer for 'Gdip' threw an exception. on Linux, you have to upgrade to 0.97+.

Install ClosedXML via NuGet

If you want to include ClosedXML in your project, you caninstall it directly from NuGet

To install ClosedXML, run the following command in the Package Manager Console

PM> Install-Package ClosedXML

What can you do with this?

ClosedXML allows you to create Excel files without the Excel application. The typical example is creating Excel reports on a web server.

Example:

using(varworkbook=newXLWorkbook()){varworksheet=workbook.Worksheets.Add("Sample Sheet");worksheet.Cell("A1").Value="Hello World!";worksheet.Cell("A2").FormulaA1="=MID(A1, 7, 5)";workbook.SaveAs("HelloWorld.xlsx");}

Extensions

Be sure to check out ourClosedXML extension projects

Developer guidelines

TheOpenXML specification 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.

Please read thefull developer guidelines.

Credits

Thanks to JetBrains for providing development tools through theirOpen Source Program

JetBrains logo.

About

ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors88

Languages


[8]ページ先頭

©2009-2025 Movatter.jp