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

Six Stars

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

can not assign context variable to sheet name


Accepted Solutions
Sixteen Stars

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

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.


All Replies
Sixteen Stars

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

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.

Six Stars

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

learnt most important thing today...