Excel crash when using spreadprocessing

7 posts, 0 answers
  1. It
    It avatar
    6 posts
    Member since:
    Mar 2014

    Posted 16 May Link to this post

    Hi,

    I have stripped our use down to be a very simple data-dump.

    Row 1 = column headers
    Rows 2 to N = data

    I am using the auto filtering feature  

    sheet.Filter.FilterRange = sheet.UsedCellRange;

    once all the data has been written

    File is being saved

    IWorkbookFormatProvider XSLXwriter = new XlsxFormatProvider();

    using (FileStream filestream = new FileStream(filename, FileMode.Create))
        XSLXwriter.Export(output, filestream);

    Output is a Workbook and filename is a unique string.

    I am simulating a user experience of wanting to us the sorting options provided within Excel however this causes a crash and the file to be recovered. Saving and re-opening fixes this problem. Comparing workbook.xml from the before(which crashes) and after(save as copy) it looks like this is missing.

    <definedNames>
        <definedName name="_xlnm._FilterDatabase" localSheetId="0" hidden="1">Sheet1!$A$1:$GJ$531</definedName>
      </definedNames>
      <calcPr calcId="0"/>

    If you could advise on solving this issue it would be great.

    Many Thanks

  2. Nikolay Demirev
    Admin
    Nikolay Demirev avatar
    103 posts

    Posted 19 May Link to this post

    Hello,

    I have tried to reproduce the issue, but with no success. I am attaching the sample project I have used to test your case. Please try in on your side and modify it so the issue can be reproduced and send it back to us to investigate and fix it.

    Regards,
    Nikolay Demirev
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. It
    It avatar
    6 posts
    Member since:
    Mar 2014

    Posted 19 May in reply to Nikolay Demirev Link to this post

    Hi Nikolay,

    Thank you for the quick response. Unfortunately I have not been able to diagnose the issue using the sample project. 

    Making 0 modifications to the project myself I am able to replicate the issue. 

    Opening the project with
    Microsoft Visual Studio Professions 2012, Version 11.0.61219.00 update 5
    Microsoft .Net Framework version 4.6.01038
    Microsoft Excel 2013, Version 15.0.4823.1002 

    Step by Step breakdown of how I have replicated the issue.

    1. Run project and save file as file.XLSX
    2. Open file in Excel
    3. Attempt to sort any column which causes an error.

    Opening the XLSX file and attempting to sort recovers the file. Looking at this in more detail it seems that Saving and Opening is not the fix rather removing and reapplying the filters. Please find below a copy of the XML from XLSX file produced as well as a copy after removing and reapplying filters.

    XML Before

    <?xml version="1.0" encoding="utf-8"?>
      <sheets>
        <sheet sheetId="1" name="Sheet1" state="visible" r:id="rId4" />
      </sheets>
    </workbook>

     XML After

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <fileVersion appName="xl" lastEdited="6" lowestEdited="6" rupBuild="14420"/><workbookPr/>
    <mc:Choice Requires="x15"><x15ac:absPath url="C:\Users\ryan\Desktop\New folder (2)\"  xmlns:x15ac="http://schemas.microsoft.com/office/spreadsheetml/2010/11/ac"/>
    </mc:Choice>
    </mc:AlternateContent>
    <bookViews>
    <workbookView xWindow="0" yWindow="0" windowWidth="25125" windowHeight="13620"/>
    </bookViews>
    <sheets>
      <sheet name="Sheet1" sheetId="1" r:id="rId1"/>
    </sheets>
    <definedNames>
      <definedName name="_xlnm._FilterDatabase" localSheetId="0"   hidden="1">Sheet1!$A$1:$AX$1</definedName>
    </definedNames>
    <calcPr calcId="0"/>
    </workbook>

    Hopefully we can work to resolve this issue.
    Many thanks

  4. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 24 May Link to this post

    Hi,

    I am afraid that still we're unable to reproduce the reported behavior.  I have attached a short video showing how it works at our side. Can you take a look at it and let me know if I'm missing anything?

    Also can you please confirm that you're using the latest R2 2016 release of UI for WinForms?

    Looking forward to your reply.

    Regards,
    Yana
    Telerik
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
  5. It
    It avatar
    6 posts
    Member since:
    Mar 2014

    Posted 26 May Link to this post

    Hi,

    The issue is with the sorting of data in excel when filters are applied not filtering the data. Please find attached a GIF showing how I replicated the problem.

    UI for WinForms Q1 2016 SP1 (version 2016.1.216) is the version we are using.

    If you need any additional information just ask.
    Thanks
  6. It
    It avatar
    6 posts
    Member since:
    Mar 2014

    Posted 26 May in reply to It Link to this post

    Oops, here is the GIF.
  7. Nikolay Demirev
    Admin
    Nikolay Demirev avatar
    103 posts

    Posted 31 May Link to this post

    Hello,

    I have been able to reproduce the issue and I have logged public item in our Feedback Portal where you can track the process on the matter.

    Regards,
    Nikolay Demirev
    Telerik
Back to Top