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

Export excel file using NPOI package

I'm trying to export datatable to an export file. until now that was successful as long as I am doing it to a specific directory. what a user should be able to do basically be able to choose the directory to download the file in excel format. i made…
Zeus Kaka
  • 7
  • 1
  • 5
0
votes
0 answers

NPOI how to get size of text in the cell

I just started to learn NPOI. I think, that I have some idea how to use it, but I just need two more things to know how to do. The first one is how to get the minimum size (height and width) of the cell with some text and style, so I will be able to…
Jakub Čermoch
  • 431
  • 1
  • 9
  • 20
0
votes
0 answers

How to maximize excel sheet column limit?

I tried to create an excel sheet using NPOI. I hit on an exception. After inspecting it and searching internet I came to know that the maximum columns an excel sheet can hold is 16384. Is there anyway to increase this limit. Because the data I have…
prabhakaran
  • 5,126
  • 17
  • 71
  • 107
0
votes
1 answer

Exporting three listboxes of different size in the same Excel file

I'm trying to export the content of three different Listboxes, using NPOI package, in three columns of an .xlsx file. While Form10.ListBox1 and Form10.ListBox2 are always made of the same number of elements, Form6.ListBox1 has different size -…
0
votes
1 answer

Looking for a good way to transfer a newly created excel in c# trough API

I have created an excel file using NPOI and would like to send this through an API to make it downloadable from that webpage. My question is that how do I in a good way send this excel file through my API? Can I store this excel file as a Blob or…
Yooric
  • 87
  • 8
0
votes
1 answer

NPOI C# SetCellValue() of bool type via variable as string

I want to SetCellValue() of bool type via variable as string for example: string parameter = "TRUE"; and now I want to SetCellValue(parameter) What is the correct way to set the cell value as boolean type from the string value above? Thansk very…
0
votes
0 answers

Excel Date value is 16 days off for some users

I have an asp.net core application that uses Npoi to generate an Excel spreadsheet from a list of objects. This works fine when I run the application on my machine. However, when some of our users run this function, the dates on the spreadsheet are…
0
votes
1 answer

How to create a checkbox in docx with NPOI

How does one create a checkbox within a docx document with NPOI? I have seen example where it is done with POI in Java, but not in the .Net version. Here is the Java example: Work with checkboxes in docx file with Apache POI
IceCode
  • 1,466
  • 13
  • 22
0
votes
1 answer

NPOI 1.2.3 - Duplicate PageSettingsBlock record (sid=0x12)

I've been testing NPOI 1.2.3 for populating various Excel templates. It was working fine, but after I made a change to one of the excel templates, I'm getting this error: Duplicate PageSettingsBlock record (sid=0x12) The error happens right at line…
mg1075
  • 17,985
  • 8
  • 59
  • 100
0
votes
1 answer

Why exporting DataTable to Excel using NPOI cause to ERR_CONNECTION_RESET

I develop a web API with ASP.NET C# and angular 8. I try to export some data from Oracle into Excel file on the server-side (using NPOI) and download it in client-side. I can see that the memoryStream have the data but on the "return response" it…
Coral Adar
  • 31
  • 4
0
votes
1 answer

NPOI how to read richtext from cell

I have to read an XLSX with NPOI. In my xlsx there are cells which they have bold words, there is a way to find those words using NPOI? Thank you
Ghil
  • 1
  • 1
0
votes
1 answer

How to evaluate a string representation of a formula/parameter in POI Apache/NPOI directly

I want to convert some spreadsheets which contain references to a plugin-defined function which we are trying to remove. There is a method to convert this which works in VBA by using SUMIFS and generating a table I am at the step where I have parsed…
0
votes
2 answers

Images not showing in excel using npoi

The below code which uses npoi to create excel documents displays images in open office calc but not in excel. If i open the doc in calc and save the document and then open the document in excel i can then see the images in excel. Here is the…
frosty
  • 5,330
  • 18
  • 85
  • 122
0
votes
0 answers

Copying sheets from Excel files to a new Excel file

I have some Excel files which each one has only one sheet, my problem when trying to copy those sheets to a new excel I got these two exceptions: Exception error. Error message: Stream does not support reading. Details: at…
H Aßdøµ
  • 2,925
  • 4
  • 26
  • 37
0
votes
0 answers

NPOI corrupting xlsm workbook

I am required to write some data into an macro enabled workbook which was developed in 1998, i am using NPOI dotnet core library for this task. I am able to write the values into the excel correctly, however i am seeing that alignment and formatting…
aditya
  • 343
  • 2
  • 14