Excel Writer Execution failing

Hi there,
I am not that expert whit Knime but I found it really helpful.
Not really sure if some topic like this already exists: I tried to search but it seems unfortunately not…since a couple of week I get an “execution failed” message when trying to create a DB through the Excel Writer node. This happens for any workflow I have.

At the beginning I though it was a problem of version, so I updated to KNIME 4.7.7 but the problem is still there. This is the message I get:

What is strange is that suddenly sometimes the nodes start working correctly, and when it happens, it does so for all the worflows I have.
Does anyone experienced this kind of issue? Any clue on how to solve it?
Thanks a lot in advance
Claudio

Hi @Cla , are all those Excel Writers writing to different sheets on the same .xlsx?

If so you have a “race condition” and the reason why it sometimes works and sometimes doesn’t would then be because sometimes the write operation from one Writer is conflicting with an ongoing operation from another, and other times it has completed ok before the next Writer tries to write.

I’m assuming this is what is happening. If it is, you have a couple of options.

You can run a flow variable flow (red line) from one writer to another thereby ensuring that one completes before another starts. (To show the flow variable ports in KNIME 4.x, right click the node and click “Show Flow Variable Ports”. In KNIME 5.x, simply hover the mouse over the node to make the flow ports visible.)

e.g.

or you can combine them all into the same Excel Writer (click the “…” on an Excel Writer node, to increase the number of sheets it can write to and then run each of your branches into a different input port so that the one Writer is writing all the sheets.

e.g.

If this isn’t your situation, then post back, maybe with a wider view of your workflow, and more details about what is writing to which files… and we can see what else might be the cause.

oh, and welcome to the KNIME community :slight_smile:

1 Like

Hi @takbb, yes the example I posted was referring to two different sheets in the same file .xlsx. I already had this issue and figured it out to run them separately, but the solution you gave me is funny and I think I’ll modify some workflows. Unfortunately, my original problem on the “Execution failures” is not referring to multiple sheet writing only, but also to single .xlsx sheet/file writing. have a look:

While I was writing, by the way, this example suddenly started to work, but when I refreshed and relaunched it, it stuck again. Don’t really know what is going on…
I guess there is a problem on my pc, but really don’t know where and how to solve it…any idea on where to check?
Thanks in advance
Claudio

It could be to do with it being on onedrive.

Does the problem go away if you write to a location that isn’t using onedrive? Also worth checking what the settings are for the onedrive location (e.g. “always keep on this device”) or if it’s set to copy to cloud and leave a link locally to save space). Those sorts of things can cause problems.

Are there any additional details of the error given in the KNIME Console window?

2 Likes

@takbb yes I guess that this is definitively the problem. I tried to link one sheet to the same file but outside OneDrive and it seems to work.
I’ll check and try to understand how to solve it following your suggestions. Otherwise I’ll move everything outside OneDrive…I also need to figure out why sometimes it works normally…Thanks really a lot for the support!
My best
Claudio

1 Like

Hi @Cla , glad to be of help, and thanks for marking my post as the solution.

I’ve had problems with cloud-sync’d drives before both here and also in a past life with Alteryx. I adopted the approach of writing locally to a dedicated folder and then having a final step which transferred the files to the cloud folder. In my case it was generally a corporate dropbox folder rather than a onedrive one but the principle I guess is the same.

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