Skip to main content
Solved

Problems with attribute name from EXCEL

  • September 30, 2021
  • 7 replies
  • 148 views

mr_fme
Enthusiast
Forum|alt.badge.img+9

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

Best answer by markatsafe

@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):

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3698 replies
  • October 1, 2021

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.


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • 145 replies
  • October 14, 2021

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.


Forum|alt.badge.img+2
  • 1891 replies
  • October 14, 2021

@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?


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • 145 replies
  • October 14, 2021

@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

 

 

 

 


Forum|alt.badge.img+2
  • 1891 replies
  • Best Answer
  • October 15, 2021

@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):


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • 145 replies
  • October 18, 2021

@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


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • 145 replies
  • October 20, 2021

@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