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?
Are you looking for sheet name for each record?
i tMap create output port and assign global variable to output.
Created excel with two sheets. Maindata and Maindata2.
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.