Skip to content
المشاريع

حول

مكتبة .NET يمكنها قراءة تنسيقات Office وكتابتها من دون تثبيت Microsoft Office. من دون COM+ ومن دون interop.

أدوات التطوير

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
؜-٢
خلال 7 أيام
؜-٢
خلال 15 يومًا
؜-١
خلال شهر
+٢

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

NuGet Nuget Ranking! Discord License EULA traffic Github contributors

[!IMPORTANT] To ensure the long-term sustainability of this project, a monthly maintenance fee has been introduced. This fee is required to be paid by all organizations or users of any library from this project who generate revenue. You can pay the fee via GitHub Sponsors.

To enact this, an EULA on binary releases is added to the repo and nuget packages since 2.8.0 that requires payment of the maintenance fee.

For more information on who must pay the fee and other frequently asked questions, please see the Open Source Maintenance Fee organisation page.

What's NPOI

This project is the .NET version of Apache POI project. With NPOI, you can read/write Office 2003/2007 files very easily.

Documentation

NPOI Official Tutorials

Getting Started with NPOI

How NPOI library succeeds

How to use NPOI on Linux

Useful Packages based on NPOI

Automatic column widths without loading SkiaSharp

If IIS Web Deploy cannot replace libSkiaSharp.dll after AutoSizeColumn runs, enable estimated column widths at application startup, before creating any workbooks:

AppContext.SetSwitch("NPOI.UseEstimatedColumnWidths", true);

The switch applies to automatic column sizing for XLS, XLSX, and streaming XLSX. The estimate uses font size and text length, so check fit for wide glyphs and proportional fonts. Other drawing and measurement APIs can still load SkiaSharp. Restart the application to release any copy of the DLL already loaded.

Sponsors

Thank you for all the sponsors. Here is the sponsors list

Advantage of NPOI

a. It's totally free to startups, freelancers, and hobbyists (whose annual revenue is less than $10,000 USD)

b. Cover most features of Excel (cell style, data format, formula and so on)

c. Supported formats: xls, xlsx, docx.

d. Designed to be interface-oriented (take a look at NPOI.SS namespace)

e. Support not only export but also import

f. Real successful cases all over the world

g. Works on both Windows and Linux

PPTX foundation (XSLF)

The initial NPOI.XSLF.UserModel API supports creating an empty transitional .pptx presentation, adding blank slides, and saving and reopening the package:

using NPOI.XSLF.UserModel;
using System.IO;

using var presentation = new XMLSlideShow();
presentation.CreateSlide();
presentation.CreateSlide();
using var output = File.Create("blank-slides.pptx");
presentation.Write(output);

Use new XMLSlideShow(inputStream) or new XMLSlideShow(opcPackage) to open an existing presentation, and GetSlides() to access slides in presentation order. Closing the presentation closes its underlying OPC package. As with the other OOXML APIs, save to a different file when opening a package from a file path.

The foundation follows the existing OOXML layering: partial PresentationML data models live in OpenXmlFormats/Presentation, while XMLSlideShow, XSLFSlide, XSLFRelation, and XSLFFactory live in ooxml/XSLF/UserModel. Packaging uses the existing OPC implementation. Slides, masters, and layouts share XSLFSheet. GetSlideMasters() and GetSlideLayouts() follow their XML reference-list order. XSLFTheme exposes read-only theme metadata using the existing DrawingML model. Unchanged master, layout, and theme parts retain their original bytes; unmodeled content remains intact when supported sheet models are saved. Opaque extension children retain their order relative to modeled sheet content, including extensions preceding common slide data in masters and layouts.

Use a layout from the same presentation to create a slide explicitly:

var master = presentation.GetSlideMasters()[0];
var layout = master.GetLayout("Blank");
if (layout == null)
    throw new InvalidOperationException("This master has no layout named Blank.");
var slide = presentation.CreateSlide(layout);
var theme = slide.GetTheme(); // May be null when the master has no theme.

Layouts expose Name and the PresentationML Type string. Slides expose GetSlideLayout(), GetSlideMaster(), and GetTheme(). The layout must be listed by a referenced master in the same presentation. Attaching a layout does not yet copy placeholder shapes or resolve inherited text formatting. Theme editing is not supported.

This is a foundation, not full PowerPoint support. Parameterless slide creation requires an existing blank layout (included in newly created presentations). The layout overload can select other layout types. Existing slide content and unsupported related parts are retained, but high-level text boxes, pictures, tables, charts, notes, rendering, and animation APIs are not yet implemented. Strict OOXML and macro-enabled presentation formats are not supported.

System Requirement

.NET 8, .NET 10

.NET Standard 2.1 (.NET Core 3.x, .NET 5, .NET 6)

.NET Standard 2.0 (.NET Core 2.x)

.NET Framework 4.0 and above

Contributors

For detailed contributors list, you are read here

Flag Counter

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…