Knime - Excel Writer and Variables difficults

Hi Guys and ladies!

In few hours, I found a problem to manipulate variables and files path… My problem was:
How to use variables for the Excel Writer component, because I tried some different ways with no success… the option on the variables button was disable… it’s made me very hurry… For this example, I’m making a report that used rest requests to get some data and write it toa excel file… so just look at the highlights ok?

Well, to short the history, I could solved it making these steps:


1 Variables Creator, 2 String Manipulation (Variable) - for “my case”, 1 String to Path (Variable), 1 Variable to Table Row and 1 Excel Writer

- “Variables Creator”: First at all, I created the string which will receive the path (absolute, relative or by yourself means).

- “String Manipulation (Variable)”: as you can see, I join 2 variables (“Reporte_Folder” and “File_Month” to create a single path for the file, replacing the value of the field “File_Month”. I made other field for other file… but it’s just a example…

- “String to Path (Variable)”: At this momment, I’ll change the context of the field, changing the “String” type to “Path”. As you set up here will be used at the end, be careful!

- “Variable to Table Row”: I used this component to works with the information. I tried to use directly at the Excel Writer without it, but the variables didn’t appears. As you can see, the path information is present.

At least,

- Excel Writer: As you can see, beside the browser button, the option for variables is enable and you can select the path that was set.

I hope that helps you… I’d like to be able to set the path directly at the Variable Creator as an option just to be quickly for this setup… but it’s ok… just few step at the end…

Thanks all!!!

@denisfi thank you for your example. Would it be possible to bring that into a sample workflow that you could upload?

I recently created an overview about how to create path variables.

Also in this workflow I have toyed around with several options how to work with Path and URIs and so on. You might want to take a look:

Sure!!! Thats a simple example!

Excel Writer with Variables.knwf (15.5 KB)

PS: To Variables be enable too, the file/data must be attached too…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.