Can we write different columns in different sheet of CSV file?

I have a table who have 150 + Columns and I want to write it into the csv file but the condition is I want to write every column in the new sheet.
Can you help me in it?

Hi @PankajChaudhary

Just a quick question and a possible answer too :slight_smile::

Q :Do you really mean into a “csv” file ? As far as I know, csv files are plain “comma separated” (or any other separator) text files without “sheet” structuring.

A: The solution for this kind of job would be to use a “Column List Loop Start” node in which you select the columns you need to save separately in every “sheet”. Inside the loop, you just need to save the column in a different sheet.

Hope this quick answer helps. Otherwise, please get back in touch with an explanation of what you mean by “sheet” in a csv file or an example and I’ll try to post the solution.

Best

Ael

4 Likes

@aworker Sorry, We can use sheets in the excel file.
I need to use Excel instead of csv.

Hi @PankajChaudhary

Then one quick possible solution is the following :

The Column List Loop start configuration:

The Excel Sheet Appender node configuration:

The KNIME workflow :slight_smile:

20210526 Pikairos Can we write different columns in different sheet of Excel file.knwf (43.7 KB)

Hope this helps

Best

Ael

2 Likes

Hello @PankajChaudhary,

you are aware your Excel file will end up with 150+ sheets? Don’t see how that would be useful unless it’s input for some other system/process…

Br,
Ivan

1 Like

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