tFileInputExcel - Sheet name is null

Five Stars

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?

 

XLSX Test Job.PNGJob StructureXLSX Test Job - Excel settings 1.PNGBasicXLSX Test Job - Excel settings 2.PNGAdvancedXLSX Test Job - tJavaRow settings.PNGtJavaRow

XLSX Output.PNGOutput

Nine Stars

Re: tFileInputExcel - Sheet name is null

Hi,

 

Are you looking for sheet name for each record?

 

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

 

ExcelSheetName.PNG

Created excel with two sheets. Maindata and Maindata2.

 

ExcelSheetName1.PNGExcelSheetName2.PNG

 

Regards,

 

Veeru Boppudi
Five Stars

Re: tFileInputExcel - Sheet name is null

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.

Nine Stars

Re: tFileInputExcel - Sheet name is null

Hi,

 

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

Memory.PNG

 

Regards,

 

Veeru Boppudi