Question

Exel reader schema difference between configuration and output

  • 24 March 2022
  • 3 replies
  • 2 views

Badge +1

When I load my excel file I want the Day attribute to be read as type char so I can split it with string functions (Left/Right). The problem I have is that FME insists on reading the attribute as a 64bit real. I have tried removing the reader, purging the temporary files, saving the workspace, closing FME, and then add the reader again. But I keep having the same result. Are there any suggestions or is this standard for the Exel reader?

excel schema problem


3 replies

Userlevel 4
Badge +36

You can perform string functions on a number.

@Left(@Value(Day),2)

Also, you can update the Excel Reader (right mouse click on the Reader in the Navigator window), and change the attribute type if you want to force Excel to read the Day attribute as a string.

 

Badge +1

Thank you for the reply. I started with the workspace on the first excel file with the day attribute read as a string. When I replaced the input file with the second file with the same attributes the problem started. Now the day attribute was read as a float number with decimal numbers. This I could correct to an integer value but then my attributemanager with the @Left(@Value(Day),2) in it stopped after 500 features. Then I started to get the day attribute day as a string, but it kept coming out as a number. So my reader is configured to read day as char(20) but it comes out as a 64bit real. This is where my question is about. Is this a standard of the excel reader or is something going wrong in the workspace.

Userlevel 2
Badge +10

Thank you for the reply. I started with the workspace on the first excel file with the day attribute read as a string. When I replaced the input file with the second file with the same attributes the problem started. Now the day attribute was read as a float number with decimal numbers. This I could correct to an integer value but then my attributemanager with the @Left(@Value(Day),2) in it stopped after 500 features. Then I started to get the day attribute day as a string, but it kept coming out as a number. So my reader is configured to read day as char(20) but it comes out as a 64bit real. This is where my question is about. Is this a standard of the excel reader or is something going wrong in the workspace.

Hi @vandijkjoostjan​, without getting too in-depth into how the Excel Reader functions, this is intended as part of the FME product. I've tested the same functionality myself and can see that attributes set to Char are processed as 64bit Real.

If this is still impacting your workflow then please let me know and I will raise your issue as an enhancement request.

Reply