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
1 answer

NPOI doesn't apply format to .xls

C#, NPOI Good evening, i'm trying to fill in an empty template with values(numbers, but in string variable), that needs to be in cells. So, when it came to formatting, i've stuck with styling. That means, when i wrote the value inside(in…
0
votes
1 answer

Updating a cell value breaks row style. NPOI, C#

Good evening, recently i was trying to update cell's value in .xls file, using NPOI library(C#), but, when i do that with cell.SetCellValue("anyvalue");, I am able to see the changes only in some cells. Other cell are just empty. Tried to save…
0
votes
1 answer

Excel formula attached to Column but value is not rendered

i have been trying to download an excel workbook from windows application(C#) with data from DB. i have few sheets that have static data and few sheets formulated with data from DB. There are few column where i have formatted excel formulas. When i…
0
votes
1 answer

Excel sheet cut off trying to export

Using c#, npoi Basically I used npoi to create and export data to an excel sheet but I'm open to other ways other than npoi to fix it. The data still exports as intended but when I try to print using excel, the sheet looks like below. I want to fix…
0
votes
1 answer

C# NPOI cannot assign FileInputStream variable to XSSFWorkbook variable

So I'm using C# with the NPOI package and trying to assign my file to to a XSSF workbook variable to be read and I'm getting the following error here is the relevant code fragment private static XSSFWorkbook workbook; // runs the…
baconbacon
  • 27
  • 8
0
votes
0 answers

Detect multiline on Excel Cell

I'm having some problems converting an excel file to csv format with C# and NPOI library. I have to return an error in case there is a multiline cell like the following |"" | |text| |text| The output of the csv file is expected to…
user9673893
0
votes
3 answers

How to Export List Data using NPOI

I'm using NPOI to export data into excel. So I created a List that will pull data from my database. Now My question is how can I read my list data and write the data on my excel Sheet. The following is my part of my code: IWorkbook…
Thamsanqa
  • 61
  • 1
  • 9
0
votes
0 answers

Excel corrupted file when change culture

I use C# .Net 4.0 to produce an excel workbook with NPOI. When I set us-EN as culture it works' fine, instead when I change the culture to it-IT I receive the following message: Excel found unreadable content in '[filename].xls'. Do you want to…
0
votes
1 answer

Cannot use HTTP Response

I am using NPOI to save files to an .xls format. I would like to save an empty file for now that a user has a dialog box and is prompted to save it locally. The problem I have is I cannot set the Response fields, because The name 'Response' does…
grozdeto
  • 1,201
  • 1
  • 13
  • 34
0
votes
0 answers

How to access this cell in NPOI?

I am using NPOI to create excel sheet using c#. I merged first two rows upto some columns. I am trying to get the next columns second row. See the picture for the reference. When I tried with worksheet.GetRow(0) It returned null.…
prabhakaran
  • 5,126
  • 17
  • 71
  • 107
0
votes
1 answer

I am getting multiple headers and footers in word document, getting null in policy.GetFirstPageHeader() using NPOI

I am getting multiple headers and footers in a Word document; I cannot differentiate the firstpage, default(odd), or even headers. When I am trying to call policy.GetFirstPageHeader() I am getting a null value. XWPFHeaderFooterPolicy policy = new…
Pradeep
  • 31
  • 6
0
votes
1 answer

How to clear the cell value in C# using NPOI

I have to clear the existing cell value using NPOI in C# I tried this but not working cell.SetCellValue(null);
0
votes
2 answers

C# Application to Print Excel - NPOI Print Setup to set to legal pager size in excel

I have a C# application that is using the NPOI library version 2.3.0.0. I want to print an excel document with the default print dialog settings pager size set to Legal Paper. I've done the following in code xlsx is an IWorkbook and sheet is…
0
votes
1 answer

NPOI Read and write removes format control of the checkbox

Writing a read Excel file removes the cell linked to that checkbox using NPOI. I have tried using a FileStream to read an Excel file with a checkbox (with a cell link using Format Control), then writing it using another FileStream removes the cell…
0
votes
1 answer

How to lock some excel columns as readonly for npoi excel sheet

unable to set npoi excel sheet as read only for some columns I have tried create freeze (sheet1.CreateFreezePane(0, 1, 0, 1);) but not working public void WriteExcelWithNPOI(DataTable dt, String extension,string MSANAme,string CheckValue) …
Yuvaraj77
  • 1
  • 1
  • 1