2 Replies Latest reply: Jan 21, 2015 8:07 AM by corchi corchi72 RSS

    Terrible !!!  All sheets are deleted

    corchi corchi72

      If you run this "code" ...  All sheets are deleted of the open document and if you want to work with it you must delete the file QVF

       

      MessageBox.Show(" CreateSheet Sheet2 ");

                  ISheet mySheet = application.CreateSheet("Sheet2");

                  if (mySheet != null)

                  {

                      try

                      {

                         

                          mySheet.Properties.MetaDef.Title = "Sheet2";

                          mySheet.Properties.Rank = 2;

                      

                         

                      }

                      catch (Exception)

                      {

                          MessageBox.Show("error to create sheet");   

                          throw;

                      }

                     

                     

                  }