NPOI | NET library for reading and writing Microsoft Office binary | SDK library

 by   dotnetcore C# Version: v1.2.2 License: Apache-2.0

kandi X-RAY | NPOI Summary

kandi X-RAY | NPOI Summary

NPOI is a C# library typically used in Utilities, SDK applications. NPOI has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

NPOI is the .NET version of POI Java project at POI is an open source project which can help you read/write xls, doc, ppt files. It has a wide application. For example, you can use it to.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              NPOI has a medium active ecosystem.
              It has 1850 star(s) with 413 fork(s). There are 141 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 98 open issues and 69 have been closed. On average issues are closed in 34 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of NPOI is v1.2.2

            kandi-Quality Quality

              NPOI has 0 bugs and 0 code smells.

            kandi-Security Security

              NPOI has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              NPOI code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              NPOI is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              NPOI releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of NPOI
            Get all kandi verified functions for this library.

            NPOI Key Features

            No Key Features are available at this moment for NPOI.

            NPOI Examples and Code Snippets

            No Code Snippets are available at this moment for NPOI.

            Community Discussions

            QUESTION

            Convert .xlsx file to html using NPOI
            Asked 2022-Mar-08 at 07:53

            I want to convert .xlsx file to html using NPOI. Is this possible? I know , xls to html conversion is available using NPOI. But not sure if NPOI provide option to convert .xlsx file to html also. Thanks

            ...

            ANSWER

            Answered 2022-Mar-08 at 07:53

            You can use ExcelToHtmlConverter. It has method ProcessWorkbook which accepts IWorkbook as a parameter. So it can be used to convert either HSSFWorkbook (xls) or XSSFWorkbook (xlsx).

            Source https://stackoverflow.com/questions/71387385

            QUESTION

            WPF Form C# submit button to excel
            Asked 2021-Dec-08 at 18:58

            I am trying to get a form that was created in visual studio WPF C# to submit to a new excel workbook will save onto a shared network drive. I have done a bit of digging trying to find the best solution and I have came across NPOI but all of the solutions seem pretty complicated compared to what I need to do. Is there some easy resource that I can reference to simply create a workbook and insert data into specific cells -- then save?

            The two related packages I have seen in NuGet are DotNetCore.NPOI and NPOI which is the one I should be using?

            What I have tried so far is:

            ...

            ANSWER

            Answered 2021-Dec-08 at 18:58

            I have figured it out like this:

            Source https://stackoverflow.com/questions/70278037

            QUESTION

            How to append existing excel file using C#
            Asked 2021-Nov-05 at 15:00

            Below are my code, I'm stuck with can't append the contents in the excel, When first time load the program, the excel can output normal But at Second time load the program, the excel will crash badly(can't open). I'm using the FileMode.Append, FileAccess.Write, but still can't works Is there have some step I missed it? please help me to solve this issue, thanks a lot!

            ...

            ANSWER

            Answered 2021-Nov-05 at 15:00

            As already commented… I can confirm from a few tests that …

            Source https://stackoverflow.com/questions/69851080

            QUESTION

            Can't read a value of the cell with a formula inside properly by NPOI
            Asked 2021-Oct-21 at 04:18

            I write in C#, and use NPOI.SS.UserModel to write a program to get value from the cell on Excel.

            The problem is the cell with formula. I am trying to get the result value from the formula cell, but I can't do it properly.

            The formula is:

            ...

            ANSWER

            Answered 2021-Oct-21 at 04:18

            Let me get straight to the point, this issue was solved by changing the module from ClosedXML to NPOI for the process of editting the Excel file .

            I'll explain what happened:

            1. Prepared a template Excel file(hereinafter referred to as TEMP). TEMP has a cell which has the Lookup formula that I explaned in OP.
            2. Copied the TEMP and create new Excel file(hereinafter referred to as NEW). Editted some cells on the NEW by ClosedXML.
            3. Read the NEW by NPOI. Couldn't read the cell value of the cell with Lookup formula properly. (This is the OP.)
            4. Changed the program for the process of the step 2. Made the process done by NPOI not by ClosedXML.
            5. With new modified program, created NEW file and read the NEW file. Read cellvalue successfully from the cell with Lookup formula.

            The reason that ClosedXML and NPOI was mixed up in the program. It used to use only ClosedXML module for both editing and reading Excel files. But, when "another" issue(couln't read the cellvalue from the cell with Lookup formula) than this OP occurred, I changed the module for ClosedXML to NPOI only for the process of reading Excel files. Because I found the article pointing out on the internet that there are un-supported formulas by ClosedXML and Lookup formula is so. But, for the process of editting Excel files, it looked it doesn't have any problem, so I continued using ClosedXML for editting Excel files.

            However, in the issue this time, when you use ClosedXML to edit Excel file that has a cell with un-supported formula like Lookup formula, somehow the formula hasn't been calculated or evaluated. And when you read it, you can't read the calculated cellvalue properly.

            Source https://stackoverflow.com/questions/69623936

            QUESTION

            Add grid lines to y-axis in NPOI bar chart
            Asked 2021-Sep-14 at 06:02

            I'd like to add horizontal grid lines to a bar chart (IChart) I created using NPOI. I can't find anything in the documentation about adding grid lines to a chart, and I'm wondering if I'm missing something. My code is shown below:

            ...

            ANSWER

            Answered 2021-Sep-14 at 06:02

            Displaying minor and major gridlines for chart is not supported.

            I would suggest to create a ticket for an enhancement.

            Source https://stackoverflow.com/questions/69124834

            QUESTION

            How to get used range in .net core by using NPOI
            Asked 2021-Sep-11 at 15:00

            I'm using NPOI in my .net core library to do some operations in my excel sheet.

            I'm now want to get the used rang in the worksheet. Is there any way to achieve this target? For some reasons, I cannot use Microsoft.Office.Interop.Excel COM component.

            ...

            ANSWER

            Answered 2021-Sep-11 at 15:00

            I've solved this question by using the LastRowNum and LastCellNum property.

            For example, If I have got a ISheet instance like the following:

            var sheet = workbook.GetSheetAt(0);

            Then, I can get the range by the LastRowNum and LastCellNum property.

            Source https://stackoverflow.com/questions/69016353

            QUESTION

            how can I insert a table in a XWPFTableCell with NPOI?
            Asked 2021-Aug-30 at 07:38

            I was trying to use NPOI to create a word document from a template.Inside the document I was trying to insert a table in a table cell.The table cell has two paragraphs, I was trying to insert a table between the two paragraphs.

            ...

            ANSWER

            Answered 2021-Aug-30 at 07:38

            Here is my solution: In the template, create a table between the two paragraphs to replace.

            Source https://stackoverflow.com/questions/68934636

            QUESTION

            How to dynamically load an Assembly Into My C# program, .NET Framework 4.7
            Asked 2021-Jun-07 at 13:54

            I'm building an Excel to .bin console app using NPOI, what I'm looking to do is compare read data to to the class one, let me explain better...

            If I have an Excel file : Sample.xlxs

            _valueOne _valueTwo 0.0f testString

            Then with my app I'll convert it into a Datatable (then serialize it) but I'll check for any error on the Excel file before I'll write the Datatable, for example in the final class that will be:

            ...

            ANSWER

            Answered 2021-Jun-07 at 13:49

            If you are using visual studio: you need to go to your project, go to reference > Right Click > Add reference. In the window that appears select Project, and then select the project that contains classes. Then save.

            EDIT: if you want to add it in a dynamic way, then, as @Romka suggested use something like this:

            Source https://stackoverflow.com/questions/67869494

            QUESTION

            Class with CellStyle static values for NPOI
            Asked 2021-May-12 at 15:23

            [Update at the bottom]

            What I want to do: Have a class with static readonly values for the CellStyles so I can have my code that builds the excel file be like this:

            ...

            ANSWER

            Answered 2021-May-12 at 15:23

            In the end doing this was the solution.

            Source https://stackoverflow.com/questions/67400897

            QUESTION

            Cell.SetCellFormula() Throw Exception System.ArgumentNullException
            Asked 2021-Apr-02 at 08:43
            class Program
            {
                static void Main(string[] args)
                {
                    EditExcel();
                }
            
                static void EditExcel()
                {
                    string path = @"test.xlsx";
                    XSSFWorkbook workbook = new XSSFWorkbook(path);
                    var sheet = workbook.GetSheetAt(0);
            
                    var row = sheet.GetRow(4);
                    var cell = row.GetCell(3);
                    cell.SetCellType(CellType.Formula);
                    cell.SetCellFormula("SUM(E4:F4)");
                    FileStream fs = new FileStream(@"newTest.xlsx", FileMode.Create, FileAccess.Write);
                    workbook.Write(fs);
                }
            }
            
            ...

            ANSWER

            Answered 2021-Apr-02 at 08:43

            It's a bug in NPOI 2.5.2. I was facing the same issue in my app and only workaround for now is to downgrade to 2.5.1. It should be fixed in the next release 2.5.3.

            Source https://stackoverflow.com/questions/66915958

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install NPOI

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/dotnetcore/NPOI.git

          • CLI

            gh repo clone dotnetcore/NPOI

          • sshUrl

            git@github.com:dotnetcore/NPOI.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular SDK Libraries

            WeiXinMPSDK

            by JeffreySu

            operator-sdk

            by operator-framework

            mobile

            by golang

            Try Top Libraries by dotnetcore

            FastGithub

            by dotnetcoreC#

            CAP

            by dotnetcoreC#

            Util

            by dotnetcoreC#

            WTM

            by dotnetcoreC#

            FreeSql

            by dotnetcoreC#