Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Author

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

Not applicable
Author

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
Author

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
Author

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
Author

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
Author

that is great

Not applicable
Author

Hi ,

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

Jeff_Koch
Employee
Employee

Irfan,

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

From the OCX

AxQlikOCX1.ActiveDocument.ActivateSheetByID "SH01"