Skip to main content
Question

Looping Empty Rows in Excel until new Column Value is found


freddy17
Contributor
Forum|alt.badge.img+8

Hello Everyone,

 

I have a question how to copy row data, but cant seem to find an efficient way to do it yet.

 

Below, attached is a Screenshot of the Original Excel file.

The idea is to take a cell value (in this case the 0.10 in the blue field at the top) and copy it for all empty column values until it reached the next filled value (0.20), which will then be copied downwards in the column.

 

 

So your result will look like this.

 

I assume with something like:

 

If CellValue Col x Value is Empty

Then Copy Col x - 1 Value to Col X

 

Continue to Col x + 1 and loop

 

Something along those lines.

Has someone dealt with this before?

 

Cheers

Fred

3 replies

danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • May 12, 2020

Hi @freddy17

Could you share us a dataset?

 

Thanks in Advance,

Danilo


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • May 12, 2020

No, looping required, just adjacent attribute handling in an attributecreator with a conditional statement which basically says, if ColumnA has a value keep the value as ColumnA, if there is no value, use the value ColumnA from the feature above. Because FME processes the features in order, the value above is always completed ready for the next line


freddy17
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • May 13, 2020
ebygomm wrote:

No, looping required, just adjacent attribute handling in an attributecreator with a conditional statement which basically says, if ColumnA has a value keep the value as ColumnA, if there is no value, use the value ColumnA from the feature above. Because FME processes the features in order, the value above is always completed ready for the next line

Hi ebygomm,

Thank you for pointing this out, is a great time saver.

 

@danilo_fme, I have added my excel and the FME solution to my enquiry, works exactly how I would want it.

 

Regards

Fredcopyrowvalues.xlsxcopyrowvalues.fmw


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings