Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get sheet name of active sheet , GetProperties();

I'm trying to get seet name by the following code:

...

Sheet s = axQlikOCX1.ActiveDocument.GetSheet(i.ToString());

string sheetName = s.GetProperties().Name;

...

In some files I get the display sheet name BUT in some 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?

best regards

4 Replies
er_mohit
Master II
Master II

got to this link

http://community.qlik.com/thread/9451

and replace Sheetid in general tab with Saheet name and use  below function in text object

write:

=GetActiveSheetId()

hope it helps

Not applicable
Author

Can you give a code example of how to use =GetActiveSheetId() to get sheet display name?

It wasn't clear in your response.

Not applicable
Author

I can't change the sheet name I treat the file like a black box.

I get the file path in C# application and do all manipulations there.

Not applicable
Author

I got the solution for that issue from Steoelpr ,a friend in the community.

     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)

thanks alot