Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Terrible !!! All sheets are deleted

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;

                }

               

               

            }

2 Replies
Not applicable
Author

Hi,

Your sheets are not deleted, but your application will not open in the client unless you set the title on the sheets. to be able to set the title you must call Suspend / Resume layout.

                    mySheet.SuspendLayout();

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

                    mySheet.Properties.Rank = 2;

                    mySheet.ResumeLayout();

Or set the properties when creating the sheet like this:

ISheet mySheet = application.CreateSheet("Sheet2",

     new SheetProperties { Rank = 0, MetaDef = new SheetMetaDataDef { Title="My sheet" } });

Best regards

Lars-Göran Book

Anonymous
Not applicable
Author

ok now works!! but also you must to write it in your pages to help.

http://help.qlik.com/sense/en-US/developer/#../Subsystems/NetSdk/Content/HowTos/NetSdk_WorkWith_Gene...

thanks corchi