Hello! I am struggling to find a way to do the following:
I have an existing table which already has a header. When I export the table in excel, however, I need the header of my table to be positioned on row 7 of the new excel spreadsheet, followed by the data in the table itself. I tried with table creator and concatenate, but I cannot get the result i wanted. How do I insert 6 completely blank rows on top of my table (before the header)? I cannot find out also how to export a table from Knime into excel by stating the exact cell address from which i want the data to be populated.
Yes, I did. But I do not see how it could help with what I want to achieve. It just adds empty rows UNDER the header, so in between the header and the data (after I add a sorter node, initially it adds them at the end of my report).
And I need these blank rows to be first , followed by the header and then the data.
Unless I am missing something and I don’t get how to make it work for me.
Split the first row to the top branch. Add the Empty Rows. Sort by RowID (Asc) to get the blank rows on top. Bring it all together with the Concat node. Hope this works for you.
@HansS provided an example using the Row Splitter node, and you can also achieve a similar result when adding empty rows by unchecking the “Missing Values” option. This allows sorting based on the style of the first table. Since the newly added rows contain zero values, they will naturally appear at the top. Hope this helps! Below you will find screenshots based on an example data set.
Try this. Bear in mind that you can’t eliminate a column header and the “header” in the 7th row is not a true header. Its part of the data table.
Hi! Thank you very much for your effort.
That was the visual result I was looking for, although it created another issue in my report and now i am not sure if i’ll be able to use it in the end. Some of the columns in my report contain amounts and I need them formatted as number, not string. But then the “fake” header (=text) appears on row 7 and the column gets formatted as “?”. So now i am thinking to try with row splitter and then concatenate, to somehow format the first 6 rows as “string” and the second part as “number”.
Thank you once again for your help!
@mstaykova, good to see that @rfeigel has been able to assist with a solution to your original problem, and great that you have marked the solution.
If you need further ideas and suggestions for this next part of your challenge, feel free to start a new topic and refer back to this one with a link.
Starting a new topic if you have further questions or need assistance for a new “discovered” scenario involving an already solved problem will be quickest way of getting you to a further solution, as more people will read it.
As @takbb suggested, start a new topic and post some sample data including both string and numeric columns. We’ll see what we can do with that. Probably will require some column renaming. You can’t have two different data types in the same column. Don’t forget that the “header” in the 7th row is not really a header. Its just part of the table.