Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to find all the chart and KPI within a sheet. I am able to find all available sheet within APP.
But i am not able to find sheet children
Hi,
You can use the .Net SDK to do this here is a code snippet:
IEnumerable<ISheet> sheets = application.GetSheets();
foreach (ISheet sheet1 in sheets)
{
Console.WriteLine(sheet1.MetaAttributes.Title);
}
More information can be found here http://help.qlik.com/en-US/sense-developer/3.0/Subsystems/NetSDKAPI/Content/HowTos/Net-Sdk-How-To-Li...
There some examples that might be useful (App traverser and App preloader) se Code samples of capabilities and use cases of Qlik Sense .NET SDK ‒ Qlik Sense
Best regards
Lars-Göran Book
Hi,
You can use the .Net SDK to do this here is a code snippet:
IEnumerable<ISheet> sheets = application.GetSheets();
foreach (ISheet sheet1 in sheets)
{
Console.WriteLine(sheet1.MetaAttributes.Title);
}
More information can be found here http://help.qlik.com/en-US/sense-developer/3.0/Subsystems/NetSDKAPI/Content/HowTos/Net-Sdk-How-To-Li...
There some examples that might be useful (App traverser and App preloader) se Code samples of capabilities and use cases of Qlik Sense .NET SDK ‒ Qlik Sense
Best regards
Lars-Göran Book
Hi ext_lgb,
Thanks for your suggestion and support. Using Dot Net SDK i am able to find the child object of Sheet, But still issue remain that I am unable to find the Title of KPI or Chart within sheet.
Please Help.
Code Sample:
IEnumerable<SheetObjectViewListContainer> list = app.GetSheetList().Items;
foreach (SheetObjectViewListContainer sheet in shhetList)
{
foreach (var item in sheet.Data.Cells)
{
string name=item.Name;//this is KPI engineID
string type=item.Type; //This is Type
}
}
Hi,
Once you have found you KPI object you have to retreive that object. On the retreived object you can get the properties or the layout for the object. The property will contain the definition and the layout the evaluated value.
Example:
IEnumerable<SheetObjectViewListContainer> list = app.GetSheetList().Items;
foreach (SheetObjectViewListContainer sheet in list)
{
foreach (var item in sheet.Data.Cells)
{
string name = item.Name;//this is KPI engineID
string type = item.Type; //This is Type
if (item.Type.ToLower() == "kpi")
{
Kpi kpi = app.GetObject<Kpi>(item.Name);
// Gets the property, note could be an expression ie "=Sum(xx)" or "The title"
string titleProperty = kpi.Properties.Title.ToString();
// Gets the layout, note the evaluated expression ie "32" or "The title"
string titleLayout = kpi.Title;
}
}
}
Best regards
Lars-Göran Book
Thank for your reply.
You are showing example only for object Type KPI but i need to get title of all the object without checking its type. Because i do not know how many type will exist in a sheet.
Please help