New Post: EOF In Header exception when reading .xlsm
FYI : this code works in order to read a file into a XSSFWorkbook: private IWorkbook InitializeAddingWorkbook(HttpPostedFile postedFile) { Stream fileStream = postedFile.InputStream; byte[]...
View ArticleNew Post: EOF In Header exception when reading .xlsm
That need to rewind seems sort of defect-ish...I wonder if it makes sense in this project to reset the position of the stream during object initialization...in any event, hopefully this message thread...
View ArticleNew Post: [NPOI.XSSF.UserModel] XLSX file : repair needed when using Double...
Hello, Sorry for the long wait, I was stuck on another big project and could not make the test. Here what I did : 1- When instanciating the new XSSFWorkbook, I added this command :...
View ArticleNew Post: Error while reading .doc file
Hi! I got this file when i'm trying to read .doc (97-2003) file. An unhandled exception of type 'ICSharpCode.SharpZipLib.Zip.ZipException' occurred in ICSharpCode.SharpZipLib.dll Additional...
View ArticleNew Post: Error reading .xlsm file with pivotTable
I have a template .xlsm file with two pivotTable in sheet2 and sheet3. If I read the file with NPOI, and save it to another path(without any changes), those pivotTable cannot be reopened again. To be...
View ArticleNew Post: Stress test of XSSF proves exponential time (performance concerns)
Why not keep the rows as an enumerated list and then have a render method that does the xml serialization at the end. That should increase performance handsomely.
View ArticleNew Post: How can I change the long date format to short date format?
when I export all data to excel file, how can I change the long date format to short date format? i.e., exported date format is 4/23/2013 12:00:00 AM, good format is 4/23/2013 Code as below:...
View ArticleNew Post: NPOI 2.0 Source Code
I could not find the NPOI 2.0 source code, someone could pass me a link where to download it? Thanks
View ArticleNew Post: Read xlsx file
Hi I am a newbie. I would like a simple example of how to read a number value from a cell. Thanks Herman
View ArticleNew Post: To write xlsx to a stream
Hi, when I tried to write a xlsx file to a memoryStream using XSSFWorkbook.write, I found the method closed the stream. This behavior made the stream cannot be accessed. HSSFWorkbook.write did not do...
View ArticleNew Post: How can I change the long date format to short date format?
I have the same question. Has anyone forced the Excel export to format the date without the time? I know that it's possible by casting the date as a string, but this solution is not ideal because it...
View ArticleNew Post: How to change the Numberformat to Text from C#
Hi, I am using NPOI for Export to .xls file. After Export to .xls when I open all the cell should be in "Text" Numberformat instead of "General". All the cells in the .xls file should take example if I...
View ArticleNew Post: Excel Conversion to PDF using NPOI
Hi , i want to convert the excel workbook which has images, chart and more than 200 columns and 1000 rows. Can anyone please provide the sample code to get it done . i have tried the solutions but...
View ArticleNew Post: New Version On NuGet
Anyway to publish a NuGet package for version 2.0 beta 1 as a Pre-Release Package?
View ArticleNew Post: How to change the Numberformat to Text from C#
I dont know if this is what you're looking for, but you can set the Format of cells to Text like this://quick example var cell = sheet.GetRow(3).GetCell(2); cell.CellStyle.DataFormat =...
View ArticleNew Post: CustomProperties in Excel (.xls): issue name and value in unicode,...
I want to add name-value pairs in the CustomProperties of an 97-2003 (.xls) Excel spreadsheet. Adding works, but name and value are inserted as unicode. The name is not not readable anymore (look like...
View ArticleNew Post: How can I change the long date format to short date format?
This is working well for me, using your code I added date formatting. The date is stored in Excel as the dateserial value so should behave correctly when sorting rather than pretending to be a date....
View ArticleNew Post: XLS file created from template doesn't save correctly - any ideas?
Hi, Using NPOI, I'm successfully creating a spreadsheet from an XLT template, but when I subsequently open the spreadsheet in MS Excel it still thinks it's an XLT template. I've checked through the...
View ArticleNew Post: HSSFColor
Slowpokes attacking! It was really hard find solution for XSSFColor, but I got it (think HSSFColor same): style.FillForegroundXSSFColor.SetRgb(new byte[] { Color.LightPink.R, Color.LightPink.G,...
View ArticleNew Post: NPOI 2.0 Source Code
Check out https://code.google.com/p/npoi/source/browse/ -- bridged from SVN to GitHub at https://github.com/svn2github/npoi You can find the XSSF and XWPF under the ooxml directory. The codeplex branch...
View Article