Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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
Not applicable

Re: Get sheet name of active sheet , GetProperties();

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

Re: Get sheet name of active sheet , GetProperties();

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

Re: Get sheet name of active sheet , GetProperties();

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

Re: Get sheet name of active sheet , GetProperties();

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