Hello
I have a error in export:
my code :
var formatProvider = new XlsxFormatProvider();
return formatProvider.Export(workbook);
and error:
{"The given key was not present in the dictionary."}
I have a error in export:
my code :
var formatProvider = new XlsxFormatProvider();
return formatProvider.Export(workbook);
and error:
{"The given key was not present in the dictionary."}
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Telerik.Windows.Documents.Spreadsheet.Core.DataStructures.QueueDictionary`2.get_Item(TKey key) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Spreadsheet\Core\Core\DataStructures\QueueDictionary.cs:line 64
thanks
4 Answers, 1 is accepted
0
Hello Jafar,
Is it possible to provide more information how to reproduce this issue. We need information about your setup and the steps you've executed in order to investigate the problem and fix it as soon as possible.
All the best,
Kammen
the Telerik team
Is it possible to provide more information how to reproduce this issue. We need information about your setup and the steps you've executed in order to investigate the problem and fix it as soon as possible.
All the best,
Kammen
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
0
Hi Sai,
We tested the file you sent us and noticed that some of the number formats which it contains are not from the built-in ones and are not declared (its formatCode is not specified), which is the cause of the behavior. If you unzip the file and open the styles.xml part, you will find there is a list of elements similar to this one:
Some of these elements refer to definitions of formats which are not in-built, but are not defined in the file either. The missing definitions are for the following number formats' IDs: 41, 42, 43 and 44. You can either remove those elements or you can add definitions for them. You can refer to the snippet below which shows how to add the format code for a number format:
Unfortunately, since we are not sure how the file was generated, we don't know what the missing format strings are.
For reference, you could check this MSDN thread where the built-in format codes are discussed.
However, this file is quite strange and it will be great if you share how it was produced.
Regards,
Tanya
Telerik
We tested the file you sent us and noticed that some of the number formats which it contains are not from the built-in ones and are not declared (its formatCode is not specified), which is the cause of the behavior. If you unzip the file and open the styles.xml part, you will find there is a list of elements similar to this one:
<
xf
numFmtId
=
"44"
fontId
=
"1"
fillId
=
"0"
borderId
=
"0"
applyFont
=
"0"
applyFill
=
"0"
applyBorder
=
"0"
applyAlignment
=
"0"
applyProtection
=
"0"
/>
Some of these elements refer to definitions of formats which are not in-built, but are not defined in the file either. The missing definitions are for the following number formats' IDs: 41, 42, 43 and 44. You can either remove those elements or you can add definitions for them. You can refer to the snippet below which shows how to add the format code for a number format:
<
numFmts
count
=
"1"
>
<
numFmt
numFmtId
=
"44"
formatCode
=
"[here goes the format code for this number format]"
/>
</
numFmts
>
Unfortunately, since we are not sure how the file was generated, we don't know what the missing format strings are.
For reference, you could check this MSDN thread where the built-in format codes are discussed.
However, this file is quite strange and it will be great if you share how it was produced.
Regards,
Tanya
Telerik
See What's Next in App Development. Register for TelerikNEXT.
0
sai
Top achievements
Rank 1
answered on 30 Mar 2015, 12:22 PM
Thanks a lot Tanya for your Reply.
We use Aspose Cells(Third party Tool for Exporting and updating Excel content) from which we generated this Excel.
Thanks,
sai
We use Aspose Cells(Third party Tool for Exporting and updating Excel content) from which we generated this Excel.
Thanks,
sai