Quantcast
Channel: NPOI
Viewing all 1621 articles
Browse latest View live

Created Unassigned: IOException while loading .xls file "block[ 0 ] already removed" [13765]

$
0
0
I get a IOException with message "block[ 0 ] already removed" while loading an .xls file. Demonstration code and file is attached in a solution that should run right out of the box. It should be very easy for anyone to reproduce. This .xls file loads successfully in Excel 2003 and 2007. The origin of the file is noted in Program.cs in the demostration code. I'm using the NPOI 2.1.3.1 from Nuget, but I also tried NPOI 2.2.0.0 and got the same results.

Building the demonstration code will automatically download the NPOI 2.1.3.1 package from Nuget.

I'll take any suggestions on next steps in troubleshooting this issue.

Commented Unassigned: IOException while loading .xls file "block[ 0 ] already removed" [13765]

$
0
0
I get a IOException with message "block[ 0 ] already removed" while loading an .xls file. Demonstration code and file is attached in a solution that should run right out of the box. It should be very easy for anyone to reproduce. This .xls file loads successfully in Excel 2003 and 2007. The origin of the file is noted in Program.cs in the demostration code. I'm using the NPOI 2.1.3.1 from Nuget, but I also tried NPOI 2.2.0.0 and got the same results.

Building the demonstration code will automatically download the NPOI 2.1.3.1 package from Nuget.

I'll take any suggestions on next steps in troubleshooting this issue.
Comments: ** Comment from web user: sevzas **

I didn't make it clear that the "test.xls" file that can't be loaded by NPOI is part of the Visual Studio solution attached to this ticket.

New Post: NPOI - Set precision as displayed

$
0
0
hallo,
I'm working with NPOI to generate a new one xlsx from a template file with the same extension.
work all fine, but I have only one trouble:
the template file has unchecked flag "set precision as displayed" (excel->advanced options), but, when I open the file generated from the template, this flag is checked.

Is there a way to keep unchecked (or set) the flag?
Thank you
Marco

New Post: How get cell background color in RGB value?

$
0
0
Interested reading date with cell format + attributes, with NPOI.

Previous, I used to work with the VBA and the color value I get through these settings.
For foreground color used this for VBA:
ActiveCell.Font.ColorIndex // getting index color, like 28
ActiveCell.Font.Color // for getting RGB color, return value like 16776960, this is value for RGB(255,255,0)

For background color used this for VBA:
ActiveCell.Interior.ColorIndex // getting index color, like 28
ActiveCell.Interior.Color // for getting RGB color, return value like 16776960, this is value for RGB(255,255,0)

I try this code with NPOI:
XSSFCell cell = sheet.GetRow(0).GetCell(0) as XSSFCell;  
ICellStyle cellStyle = cell.CellStyle;
IColor fillBackgroundColorColor = cellStyle.FillBackgroundColorColor;
byte[] argb = fillBackgroundColorColor.RGB;
But last row is no rgb color from cell.
But I only get index color (like ActiveCell.Font.ColorIndex).
When you work through library NPOI, I only get the color index and can not get the RGB color.
Tell me please, is not possible to obtain a more accurate color? And the background color as you can not?
Tell me please, how you can extract from a cell RGB accurate color, not just the standard color index. Thank you.

Created Unassigned: NPOI Delete Row [13773]

$
0
0
When operate excel by using NPOI ,I found a bug or mechanism that the NPOI provides,the NPOI will delete
the row if all columns of this row are empty, inorder to ignore that ,I must add space content in the cell of this row.Why the NPOI design this mechanism ?

New Post: Instead of 32-bit dll is there 64-bit dll as well?

$
0
0
Hi Team,

The NPOI binary packages 2.1.3.1 comes with 32-bit dll's. Is there 64-bit dll for the same.

Regards,
Naveen

New Post: Does NPOI support Pivot charts?

$
0
0
I am trying to create spreadsheet from template. Template is having 3 sheets: 1st one is chart sheet which contains pivot chart. 2nd sheet contains pivot table which is used as data table for pivot chart in 1st sheet. 3rd sheet contains data table which is used as source for pivot table in 2nd sheet.
When I fill data in 3rd sheet, pivot table generates correctly. However 1st sheet is doesn't appear in created excel document. Also when I open document it opens in recovery mode. It gives alert with following lines:
_Removed Part: /xl/pivotTables/pivotTable1.xml part. (PivotTable view)
Repaired Part: /xl/workbook.xml part with XML error. (Workbook) Load error. Line 1, column 1035.
Repaired Part: /xl/chartsheets/sheet1.xml part with XML error. (Chart sheet) Catastrophic failure Line 1, column 224._

When I put only pivot table and data table in template then document is created with no issue.
Does NPOI has support for pivot charts?

New Post: Adding headers to Word documents

$
0
0
I have an application that spits out formatted Word documents. I'm trying to edit the headers, but haven't been able to do it. Is anyone able to help?

Here's the code so far, where pHeader is the XWPFParagraph in the document I want to add:

Dim hfpPolicy As New XWPFHeaderFooterPolicy(doc)
hfpPolicy.CreateHeader(NPOI.OpenXmlFormats.Wordprocessing.ST_HdrFtr.default)

but I get an object reference not found. Any help would be greatly appreciated.

New Post: Does NPOI support Pivot charts?

$
0
0
pivot is not supported by NPOI. Maybe you can take a look at EPPlus.

New Post: NPOI - Set precision as displayed

$
0
0
which version of NPOI are you using? This flag is unchecked by default. If it's checked, it looks to a bug

New Post: NPOI change cellType if it is numeric

$
0
0
set the CellType of the cell to String

New Post: Saving macro enabled workbook gCrash excel

$
0
0
NPOI doesn't support macro-enabled Excel file (xlsm). I'm afraid the macro part is lost while saving via NPOI.

New Post: read word doc into string

New Post: NPOI.OOXML

$
0
0
Is there any reason any NPOI.OOXML is not included in the source, or at least I did not see it? I am sure I can decompile it, but making sure there is nothing against this.

Thanks,

New Post: NPOI.OOXML

$
0
0
Nvm, I got it off github.

Thanks,

Created Unassigned: Broken XLSX [13792]

$
0
0
Hi, I have several problematic XLSX files. When I try to open and save them result file is broken and can not be opened by excel.
Can you tell me what is wrong with the files ?

Thanks

Commented Unassigned: Broken XLSX [13792]

$
0
0
Hi, I have several problematic XLSX files. When I try to open and save them result file is broken and can not be opened by excel.
Can you tell me what is wrong with the files ?

Thanks
Comments: ** Comment from web user: Kelemen **

Forgot to mention that I am using version 2.2.0

New Post: Adding headers to Word documents

$
0
0
Anyone know the difference between a XWPFParagraph and a XWPFParagraph() as a data type?
It would seem to imply an array of some kind...

Example I understand:
//creates a paragraph
XWPFParagraph paragraph = document.createParagraph();

Unsure:
XWPFParagraph p1 = new XWPFParagraph(ctP1);
XWPFParagraph[] pars = new XWPFParagraph[1];
pars[0] = p1;

How do I convert a XWPFParagraph to a XWPFParagraph() requested by headerFooterPolicy.createHeader(STHdrFtr.DEFAULT, newparagraphs)?

Created Unassigned: Stack Overflow [13793]

$
0
0
Hi,

We've been using NPOI (v2.1.3.1) to upload .xls files via IIS (v7.5 on Windows Server 2008 R2). We recently ran into a situation where attempting to upload the attached .xls causes the w3wp.exe process to crash. It looks like it may be a stack overflow due to recursion? I captured and attached a stack trace of what we're seeing.

Thanks!

Commented Unassigned: Stack Overflow [13793]

$
0
0
Hi,

We've been using NPOI (v2.1.3.1) to upload .xls files via IIS (v7.5 on Windows Server 2008 R2). We recently ran into a situation where attempting to upload the attached .xls causes the w3wp.exe process to crash. It looks like it may be a stack overflow due to recursion? I captured and attached a stack trace of what we're seeing.

Thanks!
Comments: ** Comment from web user: NWIceMan **

Adding the .xls

Viewing all 1621 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>