Last Updated: 27 Oct 2015 12:06 by ADMIN
Nikolay Demirev
Created on: 06 Aug 2015 12:16
Category: Spreadsheet
Type: Bug Report
Missing built in number formats with id 41, 42, 43, 44
The fix is available in our latest LIB release (v.2015.3.1026). 
Posted on: 27 Oct 2015 12:06

The issue is fixed and is live with our latest LIB release (v. 2015.3.1026).

Best Regards,
Aylin Hyumet,
The Telerik Team
Posted on: 23 Sep 2015 08:03
And here is the current response from Telerik on the matter:

I have inspected your document and I found that it contains style definition with number format id value 43 which is built-in format but in the XLSX file format specification is not described and that is why we have not implemented it. This is causing the exception you have observed.

Posted on: 23 Sep 2015 08:02
Here is the original message, that was handled with a support ticket. The description above doesn't say much, so I thought I'd add this as information to other developers:

I got a xlsx-file that was saved LibreOffice Calc and when I tried to open it with SpreadProcessing I got this exception:

Exception Details: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

Stack Trace:

[KeyNotFoundException: The given key was not present in the dictionary.]
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +11000705
   Telerik.Windows.Documents.Core.Data.QueueDictionary`2.get_Item(TKey key) +46
   Telerik.Windows.Documents.Core.Data.ResourceIndexedTable`1.get_Item(Int32 index) +47
   Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.Contexts.XlsxWorkbookImportContext.CreateStyleFromStyleInfo(StyleInfo styleInfo, CellStyle builtInStyle) +837
   Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.Contexts.XlsxWorkbookImportContext.ImportStyles() +325
   Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.Model.Elements.StyleSheet.StyleSheetElement.OnAfterRead(IXlsxWorkbookImportContext context) +160
   Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase`3.OnAfterRead(IOpenXmlImportContext context) +90
   Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.Read(IOpenXmlReader reader, IOpenXmlImportContext context) +241
   Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Parts.OpenXmlPartBase.Import(IOpenXmlReader reader, IOpenXmlImportContext context) +60
   Telerik.Windows.Documents.FormatProviders.OpenXml.OpenXmlImporter`1.ImportXlsxPartFromArchive(ZipArchiveEntry zipEntry, OpenXmlPartBase part, IOpenXmlImportContext context) +242
   Telerik.Windows.Documents.FormatProviders.OpenXml.OpenXmlImporter`1.Import(Stream input, IOpenXmlImportContext context) +1064
   Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider.ImportOverride(Stream input) +119
   Telerik.Windows.Documents.Spreadsheet.FormatProviders.WorkbookFormatProviderBase.Import(Stream input) +120

I re-saved the file in Excel 2013 and it worked.

This is the code I use to open the file:
using (var fs = new FileStream(Path.Combine(physicalUploadFolderPath, excelFilename), FileMode.Open))
    XlsxFormatProvider formatProvider = new XlsxFormatProvider();
    return formatProvider.Import(fs);

The exception occurs at Import(fs).

Attached files:
export.xlsx is created in Libre Office Calc.
export2.xlsx is created in MS Excel 2013. 
Attached Files: