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

Reading a huge Excel file row by row from Azure Blob Storage

I want to import data using Excel, CSV and TSV formats into my applications database. The problem is that I want to allow users to upload files containing hundreds of thousands records at a time. I use Azure Blob Storage to store files, so uploading…
iboware
  • 977
  • 1
  • 12
  • 25
0
votes
1 answer

Creating MailMessage Attachment from MemoryStream

I am using NPOI to create an excel report from a template, write the workbook to MemoryStream and then attach it to a MailMessage in C#. My report is being generated OK, I can see it picks up the sheets fine in debug. But when I write it to…
wizloc
  • 2,202
  • 4
  • 28
  • 54
0
votes
1 answer

Best Way to printing Office Document on WebServer

After spending hour and hour on Stack and other Programming forum, i ask this questions to get Rex (Return Of Experience). What is the best way to achieve all this project goals : print existing Office document (Docx, Doc, maybe some XLS and…
sstassin
  • 398
  • 1
  • 3
  • 23
0
votes
1 answer

TaskCanceledException thrown on retrieving a MemoryStream with NPOI workbook

When I hit this API, a TaskCanceledException is thrown with an unhelpful stack trace. I'm using this library: https://npoi.codeplex.com/ public class TestController : ApiController { [HttpGet] public HttpResponseMessage Test() …
Corpsekicker
  • 3,276
  • 6
  • 25
  • 34
0
votes
1 answer

NPOI converting XLS to XLSX throwing null reference

I'm trying to convert a file from XLS to XLSX using NPOI. As I'm not aware of an explicit conversion, I wrote this first implementation going through the rows and cells and copying from one to another: public string ConvertToXlsx(string xlsPath) …
danielrozo
  • 1,442
  • 1
  • 10
  • 22
0
votes
1 answer

Best pattern for loading resources (files) into memory and then reuse

I'm in the process of writing an application that uses a 3rd party library (NPOI) to read/write data to excel spreadsheets. My application needs to load 25 (or more) spreadsheets into memory, and then input values into each spreadsheet, and then…
FaNIX
  • 1,888
  • 6
  • 33
  • 60
0
votes
1 answer

NPOI c# copy worksheet in another workbook xlsx

I try to copy a worksheet in another workbook xlsx with NPOI but it fails. There is an example for xls files here I don't find the equivalent XSSF functions. I always get a corrupted file. All examples use HSSF, can you help me? Here is my code does…
0
votes
1 answer

How to set a number string into a real string formation?

I'm now using NPOI to cope with Excel export, and here's my codes (part in .NET): int rowIndex = 1; for (int i = 0; i < dt.Rows.Count; i++) { IRow dataRow = sheet.CreateRow(rowIndex); for…
xqMogvKW
  • 628
  • 7
  • 17
0
votes
1 answer

Can't compile NPOI project

I'd like to use the NPOI dll in my project, so I downloaded the source code from [https://github.com/tonyqus/npoi] as there was no binary download. I opened this solution \solution\visualstudio\NPOI.sln and compiled it, However I get the following…
hyperkittie
  • 641
  • 6
  • 16
0
votes
1 answer

Convert milliseconds to individual format in C# NPOI

I use NPOI .NET third party library to export datas to *.xlsx file. I have got a time value which represented in milliseconds. For example, 2 minutes 12 seconds 3 milliseconds represented as 132003 milliseconds. I would like to display "132003" as…
olhptr
  • 67
  • 1
  • 9
0
votes
2 answers

Trying to read Excel (xls) file without having to download it first

I am trying to find a way to check the content of an excel (XLS) file over network (Using HTTP URL), and if content (Data from the particular cell, and sheet name) is fine, to save it localy. What I do now is I download the file, check it with…
Denis
  • 124
  • 2
  • 6
0
votes
1 answer

NPOI C# copy sheet with image

I try make copy of XSSF sheet with images in one workbook like this: ISheet newSheet = workbook.GetSheetAt(0).CopySheet(value.ToString()); workbook.Add(newSheet); Everyhing except images is copied correctly. When I open document with copied sheets…
Aleš
  • 783
  • 3
  • 7
  • 16
0
votes
1 answer

How to uppercase all the words in excel spreadsheet using NPOI C#

I need to convert all the words conataing in a sheet to uppercase using NPOI in C#; I can't find method to do this. Before applying uppercase : Cell[1;1]=stackoverflow After applying uppercase : Cell[1;1]=STACKOVERFLOW
Yacino
  • 645
  • 2
  • 10
  • 32
0
votes
1 answer

Excel-DNA automation on server side

I have a question regarding how does Excel-DNA tools behave when used under server side scenarios. I am fully aware of Office limitation when used in server-side scenarios, but I do not know whether Excel-DNA tools could overcome this problem. A new…
Javi bl
  • 83
  • 2
  • 7
0
votes
1 answer

Writing a file using NPOI

I'm unable to use NPOI to save changes to an xlsx to disk, when attempting to do it from a DLL. I have a set of data that I'm currently storing in a database, and a home-grown ORM for it. The home-grown ORM is housed in its own DLL. I want to…
f00f
  • 123
  • 1
  • 11