Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
chavanqlik
Partner - Contributor III
Partner - Contributor III

How to load qlik sense data into C# application

Hello All,

I'm new to Qlik sense, I'm trying to load the data from Qlik Sense desktop. I could able to connect local Qlik Sense desktop application. I was referring to this document to load script but got stuck  


Loading data into Qlik Sense ‒ Qlik Sense Developers



         IApp app ;

           

        public void createCustomScript()

        {

            string localizationScript = app.GetEmptyScript();

            string newScript = localizationScript + "LOAD RowNo() AS value, 1 AS myDimension AUTOGENERATE 300;";

        }

        public ActionResult Index()

        {

           

            Uri uri = new Uri("http://localhost:4848");

            ILocation location = Qlik.Engine.Location.FromUri(uri);

            location.AsDirectConnectionToPersonalEdition();

            var newAppIdentifier = location.HasAppWithName("Consumer Sales");

 

            using (IHub hub = location.Hub())

            {

              

                Debug.Write($"the local product version {hub.ProductVersion()}");

                createCustomScript();

            }

            Debug.Write($"the local product version {newAppIdentifier}");

            return View();

        }

Any help would be appreciated.

Thanks

1 Reply
Øystein_Kolsrud
Employee
Employee

Hi! You'll need to take the script you create in your method "CreateCustomScript" and use it as argument to the set the script of the app using IApp.SetScript Method. After you have done so, you need to trigger the script evaluation which will do the actual data load using IApp.DoReload Method.