Solved

Problems with attribute name from EXCEL

  • 30 September 2021
  • 7 replies
  • 19 views

Badge +6

I have an excel spreadsheet where the attribute name changes based on a formula, every time we fill in an X in line 2 the attribute has the same name, but the number can change to 1,2,3 and 4. I created a reading dynamic, but when for example the COD_STREET = 0 in the dynamic FME reader keeps showing COD_GATE = 4 in one of the attributes, what am I doing wrong?

 

attachment follows the spreadsheet

icon

Best answer by markatsafe 15 October 2021, 20:12

View original

7 replies

Userlevel 5
Badge +25

One option would be to not read in the first line with attribute names, that way FME will name them A, B, C etc. (corresponding with the Excel column letters). As long as the schema doesn't change (i.e. it's always the same column you need, regardless of its name) it should work.

Badge +6

One option would be to not read in the first line with attribute names, that way FME will name them A, B, C etc. (corresponding with the Excel column letters). As long as the schema doesn't change (i.e. it's always the same column you need, regardless of its name) it should work.

Sorry, no work for me.

Badge +2

@mr_fme​ I think a little more detail on the problem you're trying to solve would help us. Your headers are merged cells - but FME will read each actual column corresonding to the Excel columns A,B,S, etc. Perhaps you can show us what you'd like to read from the spreadsheet. What would you expect if a second row is added to the spreadsheet? Can you explain why @Hans van der Maarel​ suggestion of using the the column letters doesn't work for you?

Badge +6

@mr_fme​ I think a little more detail on the problem you're trying to solve would help us. Your headers are merged cells - but FME will read each actual column corresonding to the Excel columns A,B,S, etc. Perhaps you can show us what you'd like to read from the spreadsheet. What would you expect if a second row is added to the spreadsheet? Can you explain why @Hans van der Maarel​ suggestion of using the the column letters doesn't work for you?

Hi @Mark Stoakes​ 

 

For example, I have the information regarding the image below:

 

image 

I need to extract the value of these columns, in this case each X represents the sum of a number 1.

I need to transform with FME Desktop in this result below:

 

imageOr at least a result like this:

 

imageWith all the power FME has it's hard to believe you can't transform using it.

 

Thank´s

 

 

 

 

Badge +2

@mr_fme​ It would be hard to believe that FME could not help resolve this unusual case. Understanding the initial question helps.

workspaceI've attached an example workspace (FME 2021.1):

Badge +6

@mr_fme​ It would be hard to believe that FME could not help resolve this unusual case. Understanding the initial question helps.

workspaceI've attached an example workspace (FME 2021.1):

uhuuu good, very good. Helped a lot.

 

Thank´s

Badge +6

@mr_fme​ It would be hard to believe that FME could not help resolve this unusual case. Understanding the initial question helps.

workspaceI've attached an example workspace (FME 2021.1):

@Mark Stoakes​ 

 

One question more....How do I transform rows into columns, however by attr_name ie CAR_UNIT, CAR_GATE....??

 

Thank´s

Reply