Questions tagged [npoi]

.NET version of the Apache POI (Java) project

This project is the .NET version of the Apache POI project (the Java API for Microsoft Documents). POI is an open source project which can help you read/write xls, doc, and ppt files, so it has wide applications. For example, you can use it to generate an Excel report without Microsoft Office suite installed on your server and it is more efficient than calling Microsoft Excel ActiveX in the background; you can also use it to extract text from Office documents to help you implement full-text indexing feature (most of time this feature is used to create search engines).

Latest stable version: 2.6.0 / 17 November 2022

Latest actual source code: https://github.com/nissl-lab/npoi

612 questions
0
votes
0 answers

How to upload excel file in c# using NPOI Dll

I want to upload excel file of size 40MB from the client side and take the data from excel file and store it in database but while uploading .xls format file i am getting the following error: "Invalid header signature; read 0x090A0D3E7669643C,…
abhishek
  • 301
  • 1
  • 5
  • 29
0
votes
2 answers

Error while importing xlsx file uisng NPOI while it works for xls

I am trying to import an excel file (xlsx) but it throws the following question : Could not load file or assembly 'ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73' or one of its dependencies. The system…
0
votes
0 answers

NPOI's RemoveRow is very slow

I'm using NPOI to clear data of all rows from a given row index all the way to the last row using the following function: public void DeleteToLastRow(ISheet sheet, int firstRowIndex) { int lastRowIndex = sheet.LastRowNum; for (int rowIndex =…
duongntbk
  • 620
  • 4
  • 25
0
votes
1 answer

Using NPOI in Unity

I am new to the whole npoi thing but I want to put some values to specific cells in excel sheet ("exceltest.xls , cell A1,A2 ) and read the answer from cell A3. The problem is the excel doesn't recalculate the formula and send the old value here is…
0
votes
2 answers

Reading Excel sheet range wise

We want to read excel sheet data based on certain range and store it into Database. And our excel sheet contains 1807 columns and 541 rows, so we can't use Datatable to store the data into it. Also We need to check excel sheet per cell wise, for…
Ranjana
  • 85
  • 9
0
votes
1 answer

NPOI does not preserve macro on copy

I know that it is not possible to create new macro using NPOI, but according to the document, already existed macro should be preserved on copy: Macros can not be created. The are currently no plans to support macros. However, reading and…
duongntbk
  • 620
  • 4
  • 25
0
votes
1 answer

NPOI - After saving to file corrupts .xlsx workbook

I used this code to write to an exciting excel file. After writing the file, when I open the file manually it is corrupted. I am using NPOI binary 2.3.0.0 Please tell how to avoid excel getting corrupted. [Authorize] public void ExportUsers() { …
javaallone
  • 61
  • 1
  • 5
0
votes
2 answers

remove the row using NPOI Excel tool c#

I want to extract some data in the datatable, and want to send the email. But when I extract the data, excel has many blanks between the extracted data. The data which is not extracted make a blank row. When I try to use RemoveRow() function, it…
Scarlett
  • 173
  • 12
0
votes
1 answer

Upgrading to VS 2015, now having problems exporting Excel due to Response.End

I'm in the process of upgrading a project from VS 2012 to 2015, I'm down to the final error, which is getting Excel files to export. I'm using NPOI to create the Excel file and the code below to export it. Once the code hits the Response.End()…
Jimmy Genslinger
  • 557
  • 3
  • 21
0
votes
1 answer

When using NPOI which files should I add to Visual Studio in C#

I have been trying to import everything from NPOI but it won´t let me use the library afterwards, so I´m thinking I´m importing the wrong things so if anyone knows that would be great.
0
votes
1 answer

Impossibile to add NPOI library to dotnet core 1.1 library

I'm trying to add NPOI to a dotnet core library targeting netcoreapp1.1. I'm able to add to the project, but if I add this line of code wb = new XSSFWorkbook(inputStream); I have this error message Reference to type 'FileInfo' claims it is defined…
Luca Morelli
  • 2,530
  • 3
  • 28
  • 45
0
votes
1 answer

How to know whether workbook contains the sheet? Poi

When using Poi, even it doesn't have the sheet, it automatically creates the sheet. How to know whether it contains the sheet? public bool Check(string Filepath, string sheetname) { HSSFWorkbook workbook; …
nooogii
  • 25
  • 4
0
votes
0 answers

How to reorder column at runtime with NPOI or any open source code in export to excel with C#.net

Need to reorder the Excel runtime programatically with c#. Is there any way in NPOI to shift column?
Sangeeta
  • 11
  • 1
0
votes
1 answer

NPOI Linked Validations example doesn't work

I'm working my way through the examples given on the NPOI github page and the Linked Validations example doesn't work - by that I mean, it's supposed to populate a dropdown list depending on a value in another dropdown list , the first dropdown is…
pkfox
  • 11
  • 3
0
votes
0 answers

C#, Nullexception of List

I'm trying to import excel file to list of class (CLA). Excel sheet is like a table, first row has names of objects, first and second column have also specific names. Each cell has corresponding 3 names and one value. And if the cell is null, it…
ldn
  • 147
  • 1
  • 9