none
Worksheet Descendants Ordering RRS feed

  • Question

  • I'm creating a spreadsheet generation library for my company.  The library will allow users to add things like auto filtering and sheet protection to a worksheet.  As referenced in this post: http://social.msdn.microsoft.com/Forums/en-UK/oxmlsdk/thread/bf75aaf1-5533-4718-9419-f1ff31e65fdc, if these types of objects are not added to the Worksheet in the correct order, the document is considered corrupt when trying to open it in Excel.  

    1) Is there a list of Worksheet descendants and the order they need to appear in the document?

    2) Is there an easier way to add these descendants to the document in the correct order?

    Tuesday, February 14, 2012 8:16 PM

All replies

  • Hi Rick,

    Thanks for posting in the MSDN Forum.

    1. Is there a list of sheet descendants and the order they need to appear in document?

    No, it's based on my experience that all the sheet use Id property related to Worksheet Part.

    2. Is there an easier way to add these descendants to the document in the correct order?

    If you want to sort the sheet you can use the OrderBy method of List collection.

    I hope what I said can help you.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, February 16, 2012 8:15 AM
    Moderator