Bug 61533 - Exception: Duplicate name "SummaryInformation" error is coming while parsing a file NPOI 2.3.0 in C#
Summary: Exception: Duplicate name "SummaryInformation" error is coming while parsing ...
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2017-09-18 15:42 UTC by Nilabhra Bhattacharjee
Modified: 2017-09-22 15:01 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Nilabhra Bhattacharjee 2017-09-18 15:42:48 UTC

I am trying to open a file using FileStream Object in C# and I am getting an error: " 
 " Duplicate name " SummaryInformation" ". We are getting this file from our client to parse the file and process the information in our system.

But one scenario, I have noticed that If I open this file using Microsoft excel and at the time of closing, the excel is asking for save the file. If do no changes in the file and just click save button(or Ctrl + S), then I am not getting any error and the file is getting processed properly. Please find my code and exception details below:


using (FileStream sourceStream = File.Open(filePath, FileMode.Open, FileAccess.Read))
    HSSFWorkbook Workbook = new HSSFWorkbook(sourceStream); // This statement is throwing an exception    

Exception Message: " Duplicate name " SummaryInformation" "

Exception Source: NPOI DLL

Target Site Name: PopulatePropertyTree 

Please help me with a quick resolution for this. 

Thanks In advance.

Nilabhra Bhattacharjee
Comment 1 Javen O'Neal 2017-09-18 16:25:46 UTC
NPOI is a .NET fork of POI and is maintained by the folks at https://github.com/tonyqus/npoi.

Have you tried addressing your issue over there?

If you think this bug affects both POI and NPOI libraries, could you attach the file to this bug.
Comment 2 Nilabhra Bhattacharjee 2017-09-18 16:57:59 UTC

I have tried only with NPOI dll. I can not attach the file as it has sensetive information of other persons.

I can understand that without having the file, reproduction of the issue is not possible at your end. But it will be really helpful if you can tell me for which scenario this exception:
 " Duplicate name " SummaryInformation" " occurs generally for POI/NPOI library. I hope the file I am receiving is not generated by MS excel itself. It is written by another software. So if you can suggest those reason of this exception, I can check that at the source end of the file.

Please let me know about this.

Best Regards,
Nilabhra Bhattacharjee
Comment 3 Dominik Stadler 2017-09-22 15:01:42 UTC
This is likely more related to NPOI, the only thing that I see based on your description is that there are properties in the internal structures of the workbook which have the same name and thus fail some validation when the file is loaded. 

Please discuss with the NPOI project directly if you need more information on this, however you likely will need to provide more information or a sample file which reproduces the problem.

As this is more related to another library, I am closing this here.