How to delete a sheet which contains a defined-name successfully? RRS feed

  • Question

  • Hi all,

     I need your help. It's a problem about Open XML SDK programming. Here is my concern.

    I wrote a program to try to delete a sheet in a Excel file. In normal conditions, this program works very well. But when I try to delete a sheet which contains a customer-defined name whose scope is "Sheet1"(name of the sheet I want to delete), a problem occurs.

    Here is the problem description:

    I am getting a recovery message when i am trying to open the changed spreadsheet. 
    "Excel found unreadable content in "AutoDelete.xlsx" Do you want to recover the contents of the workbok?...."

    I beleive 'Sheet1' and defined name 'X' keeps some relational information some where else too and that also needs to be removed.  But how to implement this by writing codes? Is there anyone can help me?

    Friday, December 4, 2009 2:44 AM

All replies