Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I try to build a WinForms application. In this application I would like not to open a whole QlikView document but only one sheet of the document. My problem is that I can access a sheet only if I know the name or the ObjectID. How can I find out the names or ObjectIDs of the sheets?
Regards
I found a solution on my own. Not very elegant but it works. If some's interessted in my code, please post.
Hellow matthias,
I'm looking for a way to get QV sheets names using OCX.
Do you have any solution for these?
Regards
This would be help you out:
Application qvApp = new Application();
string path = "...";
Doc qvDoc = qvApp.OpenDoc(path);
int sheetCount = qvDoc.NoOfSheets();
for (int i = 0; i < sheetCount; i++)
{
string sheetName = qvDoc.GetSheet(i.ToString()).GetProperties().Name;
}
I try that In some files I get the display sheet name BUT in other I get a formula like this:
for sheet Name="Dashboard" I get "=Only({<Index = {1}>} [$(vLanguage)]) "
in other file
for sheet name="Intro" I get "=Minstring(if(Reference = 'Intro', [$(vLanguage)])) "
Is there a way to get the display sheet name ("Intro"/"Dashboard") that suitable for all QV files?
Yes vision_bi, you can solve this by this:
If the sheetName start with '='-Sign, then you can say it is an QlikView-Expression, so you must evalute this expression:
You can do this:
if(sheetName.StartsWith("="))
sheetName = qvDoc.Evaluate(sheetName)
that is great
Hi ,
Please say that procedure how you access qlikview document particular sheet from outside?
Irfan,
What kind of application are you accessing it from? A web app? A windows form exe?
From the OCX
AxQlikOCX1.ActiveDocument.ActivateSheetByID "SH01"