Skip to main content
Question

Excel problem


Hi,

 

 

I have a table in Excel as in Fig. how to arrayed all numbers in the second row?

 

11 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • April 11, 2014
Hi,

 

 

Do you want all numbers to be in the second row or in Row2?

 

 

- In second row would be a value issue: u can use a unconditional merger.

 

- In Row2 would be an attribute issue: a attributecreator can do that.

 

 


  • Author
  • April 11, 2014
in row2..i use attribute creator but nothing happend..

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • April 11, 2014
Hi,

 

 

If u mean to collapse all values to Row2:

 

 

try this

 

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • April 11, 2014
"rij2" is Dutch for row2 btw.

  • Author
  • April 11, 2014
I'm sorry, I thought like this

takashi
Influencer
  • April 11, 2014
Hi,

 

 

Is this an issue of renaming attributes? If so, I would use the BulkAttributeRenamer.

 

The BulkAttributeRenamer with this setting renames all "Row**" to "Row2".

 

 

 

Just be aware that "String" parameter must be a constant "Row2". It should not be an Attribute Value.

 

 

Takashi

  • Author
  • April 11, 2014
hi,

 

tnx for the help,  I dont have new FME, only FME 2012, and I tried it with a string replacer and does not work. have any oder idea?

takashi
Influencer
  • April 11, 2014
How about scripting? For example, the TCLCaller with this script performs the processing similar to the BulkAttributeRenamer.

 

-----

 

proc renameRows {} {

 

    foreach name [FME_AttributeNames] {

 

        if {[regexp {^Row.+$} $name]} {

 

            FME_RenameAttribute "Row2" $name

 

        }

 

    }

 

}

 

-----

 

 

Enter the script into "Source Code" and type "renameRows" (name of the procedure) in "Tcl Expression" parameter.

  • Author
  • April 11, 2014
woow, it works great..tnx

takashi
Influencer
  • April 11, 2014
Maybe I misunderstood your question. You are trying to accumulate all rows into one row?

 

A possible way is:

 

1) Remove all empty attributes. I would use TCLCaller with this script.

 

-----

 

proc removeEmptyAttributes {} {

 

    foreach name [FME_AttributeNames] {

 

        if {[string compare [FME_GetAttribute $name] {}] == 0} {

 

            FME_UnsetAttributes $name

 

        }

 

    }

 

}

 

-----

 

2) Accumulate all rows into one row using the AttributeAccumulator.

 

 

In FME 2014, the Excel reader (Read blank cells as: Missing) and the Aggregator (Mode: Attributes Only) do it.

takashi
Influencer
  • April 11, 2014
Ah, the Excel reader in FME 2012 seems to read blank cells as missing attributes. So you don't need to remove them explicitly. Just apply the AttributeAccumulator.

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