Generate a table with columns header names ranging from 1900 to 1950

Hi everyone,

I am quite new to Knime and have been unsuccessfully looking for a way to create a table with 50 columns which header names are ranging from 1900 to 1950.

Is there an elegant way to do this without using scripting ?

Thanks a lot !

 

 

Hey,

elegant would be the use of the R Source (Table) node. Otherwise you need to create a table structure with 51 columns (Create Table Structure node), extract the column headers and manipulate the column headers. Thereafter you can insert them again. You need 5 nodes for that task, it will work but it does not look good.

Best,
Marc

If you don't need to be able to reconfigure the number or names of these columns from within the workflow, you could create an Excel sheet with the required data in the first row - a quick task using auto-fill - and read it using the Excel Reader node.

Check the 'Table contains column names in row number: 1' setting and uncheck 'Skip empty columns' and 'Skip empty rows', also it looks as if you need to check 'Reevaluate formulas' to get the names without a decimal on the end.

Hi Marc,

Thanks for your answer, I'll try your 1 node R source (table). I'm definitely willing to avoid using too many nodes for such a simple thing !

All the best,

Dimitri

Hi Tom,

Thanks also for your answer. This is what I did actually, but I'm willing to keep all process tasks within Knime so, I was looking for a node-based solution.

Thanks,

Dimitri

Hi,

I have a 4-node solution:

Empty Table Creator -> Counter Generator -> Row ID -> Transpose

See attached workflow.

Cheers/Evert