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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
nivedhitha
Creator III
Creator III

Help me with the logic please

Hi,

 

I trying to load data from an excel into db and the excel can have multiple sheets with the same schema.

So the logic I'm trying to implement is, I assign a global variable or a context variable with 1(I don't need the first sheet.so starting with 1) and keep increasing it by 1 for each loop and when the error message is has "out of range" substring(meaning all sheets have been read) , I will end the loop.

But I couldn't figure how to increment the global/context variable by 1 for each loop and use it in the "sheet(name or position)" field in tfileinputexcel component.

0683p000009M2Hl.png

 

Appreciate any help. Thanks

 

Labels (2)
13 Replies
nivedhitha
Creator III
Creator III
Author

Hi @uganesh ,

 

My job has only tJava component as im trying to test it to get the no of sheets. But when I used tFileInputExcel component, it just worked fine .

And the java code for tFileInputExcel component has "org.apache.poi.xssf.usermodel.XSSFSheet" and works without a problem

Anonymous
Not applicable

Hello,,

1) why you cannot use all sheet option ?

2) will tLoop before input excel work. In sheet position you could use ((Integer)globalMap.get("tLoop_1_CURRENT_VALUE"))

Let me know if both doesnot worK.

Regards
Anonymous
Not applicable

Hello,,

1) why you cannot use all sheet option ?

2) will tLoop before input excel work. In sheet position you could use ((Integer)globalMap.get("tLoop_1_CURRENT_VALUE"))

Let me know if both doesnot worK.

Regards


I Have same problem

nivedhitha
Creator III
Creator III
Author

Hi @Moe ,

 

what exactly is your problem?

I got a solution for my problem. If it is something similar to mine, may be I can help !!