Adding blank rows using sequence with parameter

Hi,

I am trying to work out a way to add blank rows in a file with no fixed number of rows.

So even if I want to use sequence, I need to know the exact number of rows I want. I am not sure how to use the parameter function with sequence either.

To explain this properly, I have attached an excel file. It contains 3 sheets:

  • Input - contains the raw data I am trying to edit
  • Output_stage1 - contains the expected format I am trying to achieve
  • Output_stage2 - contains how I’m expecting the data to look like (basically, I have filtered out all zeroes, ‘-’, and blank rows.

Things I have tried so far:

  • Removed unwanted columns (column 1) so I can keep only the company columns
  • Unpivot - to get the columns in rows
  • At this stage I have the list of companies under ‘Labels’ and the values under ‘Data’
  • I removed the ‘Data’ and used a call another project/module action to get this list of companies
  • I renamed ‘labels’ to ‘Company Name’
  • Then added more columns ‘Column1’, ‘values’ and ‘Date’

But I am stuck at this stage, as there is no way for me to add blank rows to get the data in the format (please see sheet 2 - ‘Output_stage1’ )

Could someone be able to help me with this please?

Thank you
R
File.xlsx (13.4 KB)

Hi @RRB,

I’m not sure I understand where the blank rows should be inserted. In your data file, I only see unpivoted and then filtered data. Here is a workflow that does that:

RBB.morph (3.7 KB)

1 Like

Hi @dgudkov ,

My apologies.

I meant I wanted to insert blank rows (total 33, see: sheet1 ‘Input’, column1).

So when I use unpivot - I get the list of companynames in a column (instead of rows)

But for each company I need to add Items (from 1 to 29 + Test Row and Test Row 2)

But I get the following result:

CompanyA
CompanyB
CompanyC
etc

However I wanted to insert Items1 to 29 (+ the last 2 test rows) therefore having to repeat Company A that many times, like so:

CompanyA Item1 -
CompanyA Item2 12546.32
CompanyA Item3 -
etc etc etc

This is where I wanted to insert blank rows (equal to the number of items in column1 in the raw file) .

My apologies for the poor explanation and thank you so much for helping regardless.

I will test it now and let you know :slight_smile:

Kind regards
R