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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Iterate to use tReplace component in sheets of an excel file

Hi,

I have an excel file composed of 4 sheets. I'd like to replace some values by other values in both sheets. Then, the output file would be the same excel file, composed of its 4 sheets with all the values, including those replaced.

I used tFileExcelWorkbook and tFileExcelSheetList to parse my Excel file, then tFlowIterate to create a global variable (name of sheet) and tReplace to make the search/replace.

But after I'm stuck.. How to make it to create the same excel file, with the same sheets by using tReplace component ?

Here is a screenshot of what I tried..

0683p000009MFhG.png

Would you have any solutions ?
Thank you very much for the help !

Julien

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Could you use your currently written process to write a new file (with the replaced values), then rename the source file to something like $FILENAME.$TIMESTAMP.xlsl and rename the new file to the original file's name?
I'm not familiar with the tFileExcelSheet components (so I don't know exactly how you'd use the output one), but I'm pretty sure you could use the regular excel output component (tFileOutputExcel).  You would want to set that component to append and put your sheet-name variable from tFlowToIterate in the sheet name field.   With your existing job, you could just replace tLogRow with that component and then add the name change logic afterward.