Question

Generic reader - issue with spaces in sheet name

  • 6 December 2021
  • 3 replies
  • 4 views

I'm trying to load data from an Excel sheet which has spaces in it's name using the Generic Feature Reader. I've got the reader set up to read a dataset based on attribute values (derived from parameters), and to read the feature type directly from a parameter value.

 

The above works perfectly regardless of the dataset name, but I can't get it to work when the 'sheet_name' parameter value contains spaces. I've tried the following;

  • Using an attribute value for 'sheet_name' instead of a parameter value. This doesn't work either
  • Using an Excel reader rather than the Generic one. This doesn't work

 

Any ideas or help much appreciated. In case it's of relevance, I'm using FME Desktop 2021.1.0.1

 

Matt


3 replies

Badge +2

@mattbooker2​ I couldn't reproduce the issue in FME 2020 or 2021. I've attached an example. Perhaps you can change the configuration here to illustrate the issue you're encountering or, you can send me your existing data and workspace to mark @ safe.com

Badge +2

@mattbooker2​ Looks like the issue lies with the parameter value used to pass in the feature types to read, not the Excel reader itself. When the parameter $(sheet_name) has spaces, each word is read as a separate feature type. The parameter needs to be quoted and this can be accomplished by creating a temporary attribute in an AttributeManager and quoting the parameter there:

dialog

This works perfectly now. Thanks for your help on this @Mark Stoakes​. Feel a bit daft for not thinking of something that simple... :)

Reply