Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

corchi72
New Contributor III

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

Re: Terrible !!!  All sheets are deleted

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

corchi72
New Contributor III

Re: Terrible !!!  All sheets are deleted

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

Community Browser