Excel Writer - Not able to load multiple sheets in excel file

Hi,

I am facing issue while loading multiple sheets into one excel output file using Excel Writer Node.
Below file path , I am selecting append and sheet name is overwrite.
Everytime some random sheet is failing out of 3 sheets.

Pls let me know if i am missing any thing to configure.

1 Like

Hi @Ashuu11 and welcome to the community.

Could you please explain in more detail what you mean by some random sheet is failing? Is it an option for you to share the workflow and the data with us or a minimal example causing this error?

Best
Mark

@Mark_Ortmann It means out of 3 sheets which i want to load in one excel file, I have taken 3 respective Excel Writer nodes so every time out of 3 nodes some of the nodes is failing and not showing any specific error msg.
so i just wanted to cross check is there any specific configuration i need to do in Excel Writer node so that i can load all the 3 nodes which can write in 3 sheets of one specific excel output file,

Currently configuration which i have taken is shown in above image. Please help me to resolve this issue.

Are you executing the writers in parallel or one after the other? What OS are you working with?

@Mark_Ortmann - Yes parallel only Like in below image …Earlier there is tool Excel Appender it was working fine with that but i cant replicate same using Excel Writer…Any suggestion how can i achieve it ?
Its Windows 10 …Knime free version.

Final goal is to load data in all the 3 sheets in one excel file.

image

@Ashuu11,

I think I understand the problem now. Two things can happen.

  1. All writers are being executed at the same time, i.e., they all read the very same file and append to it. In other words Node 151, 152 and 153 append to the very same source file and thereby overwrite the changes made by any of the other nodes. Finally the output will contain the content of that node that finished last.
  2. Any of the writers tries to read the file and while reading it another writer is overwriting it which causes a problem.

Solutions:

  1. Execute the nodes sequentially, e.g., connect them via flow variable connections.
  2. Preferred solution. Click on the three dots of any of your excel writers (bottom left corner) and add two sheet input ports. Remove the the other excel writers and connect your additional ports + configure the remaining writer. This is faster than appending three times

Hope this helps,
Mark

3 Likes

@Mark_Ortmann Thanks for your valuable input. Its working now using one node and enable the ports.
One more help regarding relative path which i am defining in this same excel writer node but every time
i am facing special character error. Is there any way which could resolve this issue? Below is the configuration used:

image

What you’re entering here is a KNIME URL (This would require Write to: Costum/KNIME URL).

If you want to write the files next to your workflow keep your selection and type
…/Output/Trial[…]

If you want to write your file to your workflow so that it is self-contained select Workflow data area instead of current workflow and write Output/Trial[…]. The file finally will be located in a folder data that is contained within your workflow. Maybe it’s worth looking into the file handling guide linked in the node’s description to learn a little more about the changes that come with the new file handling.

Note that you cannot use Relative to → Current workflow to write data to your workflow!

Best
Mark

@Mark_Ortmann Thanks for your input. Its working now. :grinning:

1 Like

Glad I was able to help. Don’t hesitate to ask more questions if you run into trouble :slight_smile:. Everyone in this community is more than happy to help!

Which node do you use to load multiple sheets? Thank you.

you can use Excel Writer Node

1 Like

Hello @YJQ,

you have to use dynamic ports on Excel Writer node.

DynamicPortsExcelWriter

Check out here simple workflow example:

Br,
Ivan

2 Likes

A post was split to a new topic: Questions about KNIME Server

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