Excel Writer to network path

Hello,

I created a path flow variable referencing to network path \Fileserver\folder1\folder1.1…

However when I try to reference this through the excel writer i receive an error, referencing local path works and is not a problem.

How can I solve this?

Anyone nows how to dodge the above problem

Hello @keizersoz2,

can you show us the configuration of Excel Reader and path flow variable value?

Br,
Ivan

Hello this is the configuration of the string manipulation:
join("W:\AI\DM\client1\output ",string($Date$)) I put this in a path variable
In the Excel writer I just refer to this path variable.

However because W is a network drive it doesn’t work. When I change this to e.g. D as being local drive than it works.

image

Hello @keizersoz2,

seems to me your flow variable is of type string and Excel Reader needs it to be of type path. You can use String to Path node to convert it. For more check out this guide:

https://docs.knime.com/latest/analytics_platform_file_handling_guide/index.html#introduction

Br,
Ivan

1 Like

Hi Ipazin,

Thanks for your answer, I’m checking the doc. However it works for local drive (when I refer to a path variable that access the local drive) but not for network drive, so if it’s was a type convertion issue I guess it wouldn’ t work also for local path ?

Br

@keizersoz2 , I have similar behavior on my network. To resolve the issue I manually open network drive in windows explorer. After this network drive is resolved automatically.

1 Like

Hi @keizersoz2 , the recommendations from @ipazin and @izaychik63 are necessary to be applied.

On top of that, you need to escape the slashes in your join() statement.
From:
join("W:\AI\DM\client1\output ", ....)
to:
join("W:\\AI\\DM\\client1\\output ", ...)

The slash is an escape character, so your current join will have this value:
W:AIDMclient1output

You need to escape the slash by adding another slash.

2 Likes

Hello @keizersoz2,

What KNIME version are you using? Newer versions accept only string variable of type path in Excel Reader node…

Br,
Ivan

1 Like

Could you please elaborate on this. What exactly do you mean you open it manually in windows explorer? Everytime you run the flow or do you mean first time you configure the note so you have a default path and then you overwrite it with a path variable and only then it works properly?
Thx

@bruno29a good point. (That’s why I love python. You can escape “backslash hell” there
br

1 Like

I mean that unfortunately network paths are not resolved automatically when you map the drive. So, before run WF you need to open network drive in windows browser. After this, this network drive locations will be resolved automatically. If you use couple of network drive all of them needs to be open before access from WF.

3 Likes

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