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

Announcements
Save an extra $150 Dec 1–7 with code CYBERWEEK - stackable with early bird savings: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
YPMAL
Contributor III
Contributor III

simple job.. create output excel.. with dynamic sheet name with context

can not assign context variable to sheet name

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

OK, that is not going to work. Your tMap variables work on a basis of an expression assigned to the variable name. You cannot assign a value inside the expression (unless you are using a routine). Try using a tJavaFlex to assign the context variable like that. 

 

But another very important thing to keep in mind is that file input and output components are intialized when the SubJob starts. So your context variable value MUST be assigned before the SubJob with the Excel file component is started.

 

So, create a SubJob to assign your context variable then join that SubJob to another SubJob (using OnSubJobOk) where the file is written to.

View solution in original post

2 Replies
Anonymous
Not applicable

OK, that is not going to work. Your tMap variables work on a basis of an expression assigned to the variable name. You cannot assign a value inside the expression (unless you are using a routine). Try using a tJavaFlex to assign the context variable like that. 

 

But another very important thing to keep in mind is that file input and output components are intialized when the SubJob starts. So your context variable value MUST be assigned before the SubJob with the Excel file component is started.

 

So, create a SubJob to assign your context variable then join that SubJob to another SubJob (using OnSubJobOk) where the file is written to.

YPMAL
Contributor III
Contributor III
Author

learnt most important thing today...