We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Receiving Argument Out Of Range Exception when Saving certain Worksheets

Thread ID:

Created:

Updated:

Platform:

Replies:

124751 Jun 27,2016 06:31 PM Jun 29,2016 02:46 AM WPF 3
loading
Tags: XlsIO
Paul Lowrance
Asked On June 27, 2016 06:31 PM

Hello,

I currently have a user that is receiving the following stack trace when attempting to save certain workbooks. I am working with the users to get a "scrubbed" version of the file for a sample to upload but I was hoping that perhaps someone had seen this before.

Specified argument was out of the range of valid values.
Parameter name: Item xl/customProperty1.bin already exists in the archive
   at Syncfusion.Compression.Zip.ZipArchive.AddItem(String itemName, Stream data, Boolean bControlStream, FileAttributes attributes)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.PrepareNewItem(String itemNameStart, String extension, String contentType, RelationCollection relations, String relationType, Int32& itemsCounter, ZipArchiveItem& item)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.Excel2007Serializator.SerializeWorksheetProperty(XmlWriter writer, WorksheetImpl sheet, ICustomProperty property, Int32 counter)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.Excel2007Serializator.SerializeCustomProperties(XmlWriter writer, WorksheetImpl sheet)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.Excel2007Serializator.SerializeWorksheet(XmlWriter writer, WorksheetImpl sheet, Stream streamStart, Stream streamConFormats, Dictionary`2 hashXFIndexes, Stream streamExtCondFormats)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.WorksheetDataHolder.SerializeWorksheetPart(WorksheetImpl sheet, Dictionary`2 hashNewXFIndexes)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.WorksheetDataHolder.SerializeWorksheet(WorksheetImpl sheet, Dictionary`2 hashNewXFIndexes, Dictionary`2 cacheFiles)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveWorksheet(WorksheetImpl sheet, String itemName, Dictionary`2 hashNewXFIndexes, Dictionary`2 cacheFiles)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveSheet(WorksheetBaseImpl sheet, String itemName, RelationCollection relations, String workbookPath, Dictionary`2 hashNewXFIndexes, Dictionary`2 cacheFiles)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveSheets(RelationCollection relations, String workbookItemName, Dictionary`2 hashNewXFIndexes, Dictionary`2 cacheFiles)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveWorkbookPart(Dictionary`2 hashNewXFIndexes, Dictionary`2 cacheFiles)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveWorkbook(ExcelSaveType saveAsType)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveDocument(ExcelSaveType saveType)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveDocument(Stream stream, ExcelSaveType saveType)
   at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.Serialize(Stream stream, WorkbookImpl book, ExcelSaveType saveType)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl.SaveAsInternal(Stream stream, ExcelSaveType saveType)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl.SaveAs(Stream stream, ExcelSaveType saveType)
   at Syncfusion.XlsIO.Implementation.WorkbookImpl.SaveAs(Stream stream)
   at SyncFusionXlsIOTest3.MainWindow.Button_Click(Object sender, RoutedEventArgs e) in c:\Users\plowrance\Documents\Visual Studio 2012\Projects\SyncFusionXlsIOTest3\SyncFusionXlsIOTest3\MainWindow.xaml.cs:line 51

Any help would be appreciated!

Thanks,

Kesavan D [Syncfusion]
Replied On June 28, 2016 03:34 AM

Hi Paul, 
 
Thank you for contacting Syncfusion support. 
 
We are unable to reproduce the issue from our side. We have tried in different possible scenarios to reproduce the issue but we are unable reproduce it. We have a shared a sample for your reference which can be downloaded from following location. 
 
 
Kindly modify the sample to reproduce the issue and share us the modified sample along with the issue reproducing input files which will be helpful for us to give you a prompt solution at the earliest. 
Please let us know if you have any concerns. 

Regards, 
Kesavan 


Paul Lowrance
Replied On June 28, 2016 11:30 AM

Thank you for the quick response. I am working now to get a file that has sensitive data removed so I can share with you. The code sample you provided returns the same error we are seeing in our application which means it is definitely something in the workbook.

Kesavan D [Syncfusion]
Replied On June 29, 2016 02:46 AM

Hi Paul, 

We have recently fixed a similar type of issue with “ArgumentOutOfRange Exception is thrown on saving workbook with custom properties” in our latest version 14.2v which can be downloaded from following link. 


If you are still facing this issue after upgrading to our latest version then share us the input document which will be helpful for us to provide you a prompt solution at the earliest. 

Please let us know if you have any concerns. 

Regards, 
Kesavan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;