1 Reply Latest reply: Jan 21, 2015 9:47 AM by Lars-Goran Book RSS

    how to create sheet in Qlik Sense from Dot net

    khánh trung

      I try to create new sheets , objects in Qlik Sense  from Dot net and get this error "The function evaluation requires all threads to run."

      Any idea for this problem

       

      The function evaluation requires all threads to run.

       

      Coding:

       

      ILocation location = Qlik.Engine.Location.Local;

              protected void Page_Load(object sender, EventArgs e)

              {

                  IAppIdentifier appIdentifier = location.AppWithName("KhanhDemo");

                  IApp application = location.App(appIdentifier);

                 // ISession appSession = Qlik.Engine.Session.WithApp(appIdentifier);

                      try

                      {

                         

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

                          txtText.Text += mySheet.Info.Type;

                      }

                      catch (Exception ex)

                      {

                          txtText.Text += ex.Message;

                      }

                  }

        • Re: how to create sheet in Qlik Sense from Dot net
          Lars-Goran Book

          Hi,

          You are getting this exception during debug and that is because the .Net SDK is "lazy", it only fetch the data when you access it. One way is to save the data that you want to inspect in a temporary variables. Further you need to set the title on the sheet and save it to make it work on the client.

           

          ISheet mySheet = application.CreateSheet("Sheet2",

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

           

          applcation.DoSave();

           

          Note thet your application must also have a script otherwise the client will ask you to add this before being able to work with sheets.

          Here is some simple code to create a script:

          application.SetScript("Load RecNo() as Dim1 AutoGenerate 100;");

          application.DoReload();

           

          Best Regards

          Lars-Göran Book