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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
NicholasN
Contributor II
Contributor II

tFileInputExcel - Sheet name is null

I have a job that is reading in a 150MB xlsx file with multiple sheets.  I am trying to set up a field that captures the current sheet name so I can add it to the row.  Due to the size of the sheets (Sheet1 is almost at the maximum number of rows, over 1 million), I have to read the sheet in low memory, event mode, with the "All sheets" option checked.  As part of my test, I just have the tFileInputExcel flowing into a tJavaRow, and the tJavaRow is just spitting out ((String)globalMap.get("tFileInputExcel_1_CURRENT_SHEET")) to the console.  I plan on having it just assign this value to a new output column.

 

With this set up, all rows are retrieving a NULL for ((String)globalMap.get("tFileInputExcel_1_CURRENT_SHEET")).  I didn't see anywhere in the documentation that this behavior is expected, so I was wondering if this is a bug or an unavoidable consequence of low memory mode or large sheets.

 

In addition, does anyone know of an alternative method?

 

0683p000009Ltai.pngJob Structure0683p000009Ltas.pngBasic0683p000009LtMo.pngAdvanced0683p000009LtSG.pngtJavaRow

0683p000009Ltax.pngOutput

Labels (1)
3 Replies
vboppudi
Partner - Creator III
Partner - Creator III

Hi,

 

Are you looking for sheet name for each record?

 

i tMap create output port and assign global variable to output.

 

0683p000009LsyR.png

Created excel with two sheets. Maindata and Maindata2.

 

0683p000009LtI5.png0683p000009LtIA.png

 

Regards,

 

NicholasN
Contributor II
Contributor II
Author

That's exactly what I'm looking for.  That is also unfortunately what doesn't work.  In the example you posted, vboppudi, did you turn on low memory mode?

 

I've tried a couple other experiments, and it appears that with low memory mode for an xlsx file, ((String)globalMap.get("tFileInputExcel_1_CURRENT_SHEET")) just doesn't work.

vboppudi
Partner - Creator III
Partner - Creator III

Hi,

 

I am not using enterprise edition. Memory option disabled for me.

0683p000009LtKf.png

 

Regards,