Error saving and reopening saved file - The given key was not present in the dictionary

12 posts, 0 answers
  1. PabloFacture
    PabloFacture avatar
    3 posts
    Member since:
    Jun 2012

    Posted 12 Nov 2013 Link to this post

    Cause:
    I have several excel spreadsheets (xslx) which are given to customers as templates for them to open and start adding extra information. Such information is saved to a separate file. The issue is that when customers open their file, it displays the following error message:

    The given key was not present in the dictionary

    I even tried one of my templates on your demo online for Silverlight RadSpreadsheet and it does not work either:

    http://demos.telerik.com/silverlight/#Spreadsheet/FirstLook

    Updates to most of the excel files I have as templates for customers do not work either.

    On the link below you can find a PDF with a walk-through (screenshots) of a demo reproducing the error.

    Screenshots Reproducing Bug - Key Not Present Dictionary.pdf
    http://sdrv.ms/1i77dav

    Steps to reproduce the bug:

    1. Open page with Silverlight radspreadsheet (e.g. http://demos.telerik.com/silverlight/#Spreadsheet/FirstLook)
    2. Open an existing excel file. You can use the one below.

    Open this file - Make changes - Save - Close - Reopen.xlsx
    http://sdrv.ms/17mNPik

    3. Make a change. I updated cell A1 with "abc".
    4. Save changes to a second file.
    5. Open file back up.
    6. You'll get a beautiful "The given key was not present in the dictionary" error message.

    This is a stopping point for our project as we already got on board using these controls. Can you please give a hand real quick?

  2. Nikolay Demirev
    Admin
    Nikolay Demirev avatar
    103 posts

    Posted 14 Nov 2013 Link to this post

    Hello,

    Thank you for writing and thank you for the detailed explanation.

    We have managed to fix the bug you reported. The fix will be included in the next internal build, which will be available next week.

    The issue was caused by the rich text contained in some cells in the document. Please bear in mind that for the time being RadSpreadsheet does not support rich text content in cells and it is ignored.

    Regards,
    Nikolay Demirev
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
  4. PabloFacture
    PabloFacture avatar
    3 posts
    Member since:
    Jun 2012

    Posted 20 Nov 2013 Link to this post

    Hi, can you please confirm the bug was fixed so that we can proceed downloading the next internal build? If so, can you provide the build number?

    Thanks!
  5. Nikolay Demirev
    Admin
    Nikolay Demirev avatar
    103 posts

    Posted 21 Nov 2013 Link to this post

    Hi,

    The bug was fixed and the fix is included in the 2013.3.1118 build. You can download it from your Telerik profile after logging in.

    Please note that internal builds are intended for testing purposes and we do not recommend them for production. Our next official release - Q3 SP1 2013, is expected in a couple of weeks.

    Regards,
    Nikolay Demirev
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. PabloFacture
    PabloFacture avatar
    3 posts
    Member since:
    Jun 2012

    Posted 26 Nov 2013 Link to this post

    I have tested the fix and is not quite right. Customers are experiencing issues while using the RadSpreadsheet Silverlight control. Indeed, it is not throwing an error. However, all custom data they entered to our excel templates are lost when they have some sort of formatting (I guess it is considering it as RTF). Basically, all cells on which customers enter data and apply bold, italic, different font size or color, underline, and the like. Such data is completely lost when reopening a previously saved document.

    You can use the same excel document posted above and reproduce with the same steps.

    This is defeating the purpose of adding the control to our application and a bit embarrassing while doing a presentation to customers.

    The expected behavior is to have customers' custom data saved after opening and editing the application's excel spreadsheets. This functionality is on the critical path of our application. Can you please let me know whether this can be implemented? Based on your response, we will have to make a decision on our project in terms on how to achieve this customer requirement.
  7. Petya
    Admin
    Petya avatar
    975 posts

    Posted 28 Nov 2013 Link to this post

    Hello,

    We are not sure we understand your scenario properly.

    As far as I understand, these are the steps that cause the problem you are observing. Could you please verify that?
    • Importing the document from your first reply in a project targeting the LIB version of RadControls.
    • Applying formatting to one (or many) of the cells, i.e. clicking the FORMATO cell and then Bold, Italic, etc. buttons on the ribbon.
    • Exporting the document to XLSX.
    • Upon importing it back in the same application, the data from the cell is missing.

    I tried executing those steps with the mentioned version and everything seems to work as expected.

    As to rich text, setting cell formatting is not part of the rich-text concept. If you look at your document, you might notice on the bottom a cell which contains a bold word ("Note") and then some non-bolded content. Such content is considered rich-text and is currently ignored by the control on import. However, you should not be able to create similar setup in RadSpreadsheet and export it, since once you select only part of the content in a cell (in the formula bar) the buttons on the ribbon are disabled.

    Please try to provide details on the problem you are facing and we will gladly address it.

    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  8. Sergio
    Sergio avatar
    3 posts
    Member since:
    Sep 2013

    Posted 28 Nov 2013 Link to this post

    I have the same problem as Mr PabloFacture reported earlier, I have attached two pictures in which you can see the problem.

    1. In the excel in row A37, we typed text (excel file.png).
    2. We test the same file on the telerik page demo and the same row (A37) is empty (error.png).
    3. We test the same file on the 2013.3.1118 build and the same row (A37) is empty.

    The following is the link to the original file for your tests.
    https://drive.google.com/file/d/0B0KaGWCwzokpdUQ1ek9tbDBvMVE/edit?usp=sharing
  9. Petya
    Admin
    Petya avatar
    975 posts

    Posted 29 Nov 2013 Link to this post

    Hi,

    As previously said, the initial issue causing an error when you try to import the file is already fixed and the fix will also be included in the upcoming in a couple of days service pack.

    When it comes to the missing content when testing this with the LIB, at this point there is not much we can do. Supporting rich text in cells is in our to-do list, however we haven't set a particular date for its implementation. Our development plans greatly depend on client's feedback, so rest assured that your needs are taken into account and we will do our best to introduce this feature as soon as possible.

    Let us know if you have any other questions.

    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  10. Robert
    Robert avatar
    1 posts
    Member since:
    Jan 2014

    Posted 06 Jan 2014 Link to this post

    I have the same problem, but I am using the WPF version of RadSpreadsheet.  Is there an update that I can download, as I am trying to evaluate your product for consideration.

    Thanks,
    Rob
  11. Petya
    Admin
    Petya avatar
    975 posts

    Posted 09 Jan 2014 Link to this post

    Hi Rob,

    I checked your account and the version of RadControls for Silverlight you've downloaded should contain the fix discussed in this thread. We would appreciate if you send us the problematic document, so that we can further investigate this.

    We're looking forward to hearing from you.

    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  12. sai
    sai avatar
    10 posts
    Member since:
    Apr 2014

    Posted 24 Mar 2015 in reply to Petya Link to this post

    Even I'm getting the same exception... I'm using latest dlls
    Please find the attachment to reproduce the issue
    Rename the extension from png to Xlsx
  13. Tanya
    Admin
    Tanya avatar
    402 posts

    Posted 27 Mar 2015 Link to this post

    Hello Sai,

    Thank you for your question.

    We have already addressed your issue in the forum thread where you posted about it. You can find the answer following this link.

    Regards,
    Tanya
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top
DevCraft banner