Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to assign a dynamic name to the NPrinting Sheet Name but somehow it is not working. I followed these steps but still not working:
Step 1: I created a variable in the QlikView -> vMaxWeekName =MonthName(Max(DATE)) & '_' & KW01
Step 2: Added variable "vMaxWeekName" in NPrinting Variable section
Step 3: Drag and Dropped this variable vMaxWeekName in NPrinting Sheet Title. But see static output as it is variable name:
I tried these 2 solutions but are not working for me:
https://community.qlik.com/t5/Qlik-NPrinting/Formula-in-Excel-Sheet-Names/td-p/1607621
Mine example is the only one which can give you dynamic sheet name. It is not based on variables or formulas but it must be based on <Page> tag and field value.
My explanation in link provided is very thorough so I am not sure which part is not working for you?
As per analogy you would need to create a field in your data model which would store that single value of MAX Week Name as a field value and then just use it as a page in excel template
Mine example is the only one which can give you dynamic sheet name. It is not based on variables or formulas but it must be based on <Page> tag and field value.
My explanation in link provided is very thorough so I am not sure which part is not working for you?
As per analogy you would need to create a field in your data model which would store that single value of MAX Week Name as a field value and then just use it as a page in excel template
1. Create variables in script containing the expression for dynamic sheet names.
2. Add those variables in a inline table and use the inline table fields in frontend table chart.
let vName=<your expression for dynamic naming>;
dynamicsheetName:
load * inline
[
SheetName
$(vName)
];
3. Now as posted by @Lech_Miszkiewicz add the qliksense object in 'Page' option in Nprinting template and a sheet will be automatically get created having the same name as your qliksense chart column value.
Regards,
Aditya
I see the variable is not working but with page it is working.
I want to ask you last thing, how to handle multipe sheet names.
Do I need to create multiple fields in Data Island for each sheet name or anyother way?
For example:
1. I have one report in excel file format and it has two tabs:
1st tab name is 'Text' & Calender Week
2nd tab name 'Text' & This Year
2. I have another report in excel file format and it has also two tabs:
1st tab name is 'Text' & Calender Week
2nd tab name 'Text' & Last Year
It depend what those Sheets in Excel represent.
If each of those sheets contains different layout of the report then yes - you need to create individual independent fields. My solution is just a workaround as <Page> has normally completely different use - see https://help.qlik.com/en-US/nprinting/May2022/Content/NPrinting/ExcelReports/Create-Excel-Reports.ht...
However if your Week and Year Sheets are exactly the same and only time frame is different which has to be applied then maybe you could leverage <Page> and use single field with grouping dimension which will support both reports.
I suggest you study thoroughly the help document for more info.
cheers