Qlik Community

QlikView Integration

Discussion Board for collaboration on QlikView Integration.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

QlikView OCX: Accessing sheets of a document

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

8 Replies
Not applicable

QlikView OCX: Accessing sheets of a document

I found a solution on my own. Not very elegant but it works. If some's interessted in my code, please post.

Not applicable

Re: QlikView OCX: Accessing sheets of a document

Hellow matthias,

I'm looking for a way to get QV sheets names using OCX.

Do you have any solution for these?

Regards

Not applicable

Re: QlikView OCX: Accessing sheets of a document

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;

}


Not applicable

Re: QlikView OCX: Accessing sheets of a document

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?

Not applicable

Re: QlikView OCX: Accessing sheets of a document

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)

Not applicable

Re: QlikView OCX: Accessing sheets of a document

that is great

Not applicable

Re: QlikView OCX: Accessing sheets of a document

Hi ,

Please say that procedure how you access qlikview document particular sheet from outside?

Employee
Employee

Re: QlikView OCX: Accessing sheets of a document

Irfan,

What kind of application are you accessing it from?  A web app?  A windows form exe?

From the OCX

AxQlikOCX1.ActiveDocument.ActivateSheetByID "SH01"

Community Browser