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

Created Unassigned: Document with links corrupted [14102]

$
0
0
MSO write that document corrupted and remove hyperlinks from /xl/worksheets/sheet1.xml
LibreOffice 5.2.5.1 open document fine and links work but after resaving links missed too.
Document sample attached

NPOI 2.2.1

Commented Unassigned: Document with links corrupted [14102]

$
0
0
MSO write that document corrupted and remove hyperlinks from /xl/worksheets/sheet1.xml
LibreOffice 5.2.5.1 open document fine and links work but after resaving links missed too.
Document sample attached

NPOI 2.2.1
Comments: ** Comment from web user: quazi_node **

NPOI 2.3.0 have this bug too. Sample file attached

Commented Unassigned: Document with links corrupted [14102]

$
0
0
MSO write that document corrupted and remove hyperlinks from /xl/worksheets/sheet1.xml
LibreOffice 5.2.5.1 open document fine and links work but after resaving links missed too.
Document sample attached

NPOI 2.2.1
Comments: ** Comment from web user: quazi_node **

Looks like some links too long

New Post: How to copy merged cell as it is to other cell using c#

$
0
0
I am trying to copy Merged cells as a single cell from XLSX format template and i want it to copy to another cells. I am not sure how to achieve it by using c#. Can anyone help how to do this.

Thanks in advance.

New Post: Do we have Excel Template feature in NPOI? Instead of binding row by row in excel, is there any feature to assign data source and generate excel.

$
0
0
Do we have Excel Template feature in NPOI? Instead of binding row by row in excel, is there any feature in NPOI to assign data source(using data marker) and generate excel.
For example, I have dataset which has five columns, I wanted to export data table as Excel using NPOI without looping row by row. Just wanted to assign dataset as data source and generate excel.
We need this to increase performance.

Also, suggest if you have any other feature in NPOI to increase performance.

New Post: Problem With Excel 2013 Worksheet Losing Attrubuites

$
0
0
I have been trying to update a spreadsheet that has a lot of Cell Formatting;
When I just Open using " hssfwb = new XSSFWorkbook(file);"
and Write to a New File I get a recovery Error stating some content had issues.
here is the log:
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<logFileName>error122560_01.xml</logFileName>
<summary>Errors were detected in file 'C:\Checklist.xlsx'</summary>
-<repairedParts summary="Following is a list of repairs:">
<repairedPart>Repaired Part: /xl/worksheets/sheet1.xml part with XML error. Load error. Line 1, column 0.</repairedPart>
</repairedParts>
</recoveryLog>

I have lost the following attributes:
Colum Length.
Data Validation.

Have I exceeded the Limits of this really cool tool?

New Post: Decrypt Excel 2013 file

$
0
0
Hello,
I'm trying to open a password protected Excel 2013 file with the Decryptor. It seems to support only SHA1 but new Excel files are SHA512.

I tried to update but not so easy :)

Is it normal the Crypt namespace is not anymore in the NuGet package ?
NPOI.POIFS.FileSystem.POIFSFileSystem nfs =
    new NPOI.POIFS.FileSystem.POIFSFileSystem(
    new FileStream(file, FileMode.Open, FileAccess.ReadWrite));

string password = "123";
EncryptionInfo info = new EncryptionInfo(nfs);
Decryptor dc = Decryptor.GetInstance(info);
bool b = dc.VerifyPassword(password);

Created Unassigned: WeekDay Function Uses Monday=1 Instead of Sunday=1 [14114]

$
0
0
Excel default weekday start is Sunday=1 but NPOI uses Date.DayOfWeek() which follows ISO with Monday=1.
The value displayed in excel hence is not the same as the value given by NPOI __once the workbook is evaluated__ by NPOI.

you can reproduce using a workbook with a single value in first cell: '=WEEKDAY(TODAY())' and the following code

```
Dim wb As IWorkbook = WorkbookFactory.Create(originalfilepath)
Dim sh As ISheet = wb.GetSheetAt(0)
Dim c As ICell = sh.GetRow(0).GetCell(0)
Console.WriteLine(c.NumericCellValue)
wb.GetCreationHelper().CreateFormulaEvaluator().EvaluateAll()
Console.WriteLine(c.NumericCellValue)
Console.ReadLine()
```

Output (29/06/2017):
5
4

New Post: Can`t put picture in worksheet

$
0
0
hello,

You must set the position of picture. (Row1,Row2,Col1,Col2)

But, if we don't set Resize(value) for picture => we always get the warning message when open excel file.

Repaired Records: Drawing from /xl/drawings/drawing1.xml part (Drawing shape)

I'm not sure that is an error!

Thanks

Created Unassigned: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown [14125]

$
0
0
Getting Exception while export:

__fieldValue:__ 02048906_00000
__Code:__ crow.CreateCell(cellindex).SetCellValue(Convert.ToString(fieldValue));

__Exception:__
at System.Text.StringBuilder..ctor(String value, Int32 startIndex, Int32 length, Int32 capacity)
at NPOI.SS.Util.CellReference.FormatAsString()
at NPOI.XSSF.UserModel.XSSFCell.SetCellNum(Int32 num)
at NPOI.XSSF.UserModel.XSSFRow.CreateCell(Int32 columnIndex, CellType type)
at NPOI.XSSF.UserModel.XSSFRow.CreateCell(Int32 columnIndex)

Please Help...

New Post: Extracting macro code

$
0
0
Is it possible to extract macro code from XLS files?

Created Unassigned: Create a bar chart using XSSFWorkbook [14129]

$
0
0
Dear All,

I have an XSSFWorkbook and I need to create a bar chart, but I have not found anything on the internet and in the documentation for npoi. Has anyone ever had to do something like that?

Right now, grateful!

New Post: Is it possible for NPOI to covert WORD to PDF

$
0
0
Hi:

I have a question about is it possible for NPOI to covert WORD to PDF,
there seems no other third-party free library to do that, so, is it possible
for NPOI to do that, any instruction is highly appreciated, thanks

New Post: Performance issue when generating xlsx file with large amount of data

$
0
0
Hi, We have a requirement to generate xlsx file with two sheets. Each sheet contains around 5 lakhs of data and 10 columns. It is taking more time(more than an hour) to generate excel file.
Please let us know the option to increase performance.
For Java, I have seen SXSSFWorkBook(Streaming POI). Do we have similar option for C#/VB .Net. Please suggest.

Created Unassigned: Performance issue when generating xlsx file with large amount of data [14130]

$
0
0
Hi, We have a requirement to generate xlsx file with two sheets. Each sheet contains around 5 lakhs of data and 10 columns. It is taking more time(more than an hour) to generate excel file.
Please let us know the option to increase performance.
For Java, I have seen SXSSFWorkBook(Streaming POI). Do we have similar option for C#/VB .Net. Please suggest.

New Post: Could not load file or assembly 'NPOI, Version=2.1.3.1

$
0
0
HI

I am trying to build one of my assemblies on my Build Server which uses NPOI(2.3.0) references. I work fine if i build it from my local system (Development Envionment), but when i build it from my Build Server using TFS with signing and deploy to my Web Application it give following exception
Could not load file or assembly 'NPOI, Version=2.1.3.1, Culture=neutral, PublicKeyToken=0df73ec7942b34e1' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Also i have read some where that is a known bug in NPOI, so for the confirmation please do reply on this

I have corsses check all the assemblies and reference on my build server and everything is in place so not able to figure out what is the actual issues is.

Thanks in Advance

Created Unassigned: The method or operation is not implemented exception [14134]

$
0
0
I am using the latest version of NPOI i.e. 2.3.0.0 for exporting a large number of data. Now, I am getting the exception at calling SetCellValue method of ICell as The method or operation is not implemented.

Commented Unassigned: Opening and saving existing XLSM spreadsheet detaches macros from controls [14081]

$
0
0
I have an XLSM spreadsheet which contains form controls with macros attached.
Opening this spreadsheet with NPOI and then saving it causes all macros to be detached from controls.
I have to manually assign macros to all controls.
Comments: ** Comment from web user: FlauzerOriginal **

... at least it would be nice to avoid the crash.
The base is to change the value of some cells leaving the macro structure intact

Created Unassigned: Exception "Extern sheet is part of LinkTable". Can not create HSSFWorkbook object from FileStream. [14145]

$
0
0
Below code throw an exception "Extern sheet is part of LinkTable"

using (var fileRead = new FileStream(FileName, FileMode.Open, FileAccess.Read))
{
try
{
xlsFile = new HSSFWorkbook(fileRead);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

Could u help with opening this file. Microsoft Office easily opens this file and offer to resave. After resaving NPOI easily works with this file.

But i need NPOI way to work with files like this.

Reviewed: NPOI 2.2.1 (Oct 31, 2017)

$
0
0
Rated 5 Stars (out of 5) - Great library!
Viewing all 1621 articles
Browse latest View live


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