Skip to main content

I would like to create a Flow app where the user can upload an Excel file for further processing. But I need some help on how to validate it:

  1. How do I best make sure that the uploaded file really is an Excel file?
  2. How do I validate that the first row contains attribute names and that the first attribute follows a certain name standard (for instance, “Street_Name”)?
  3. How do I automatically create attributes for the remainder of the columns? (Some uploaded Excel files might only have “Street_Name”, but other may have columns like “Speed_Limit” or “One_Way” or whatever attribute the user want to keep in the processing.)
     
  1. Specify Extension Filters for the user parameter specifying the file to only allow excel file extensions
  2. I read the file using the feature reader and read schema and data features and perform checks to ensure the schema matches what is expected before doing further processing
  3. Dynamic writing (assuming you’re looking to do some sort of file conversion)

  1. The Extension Filter set to  “*.xlsx OR *.xls” works well as long as I run the workspace in FME Form, but when published to Flow and run there, it doesn’t work!
     



    Result in Form:



    Result when running the published workspace in FME Flow:


    Using the same folder, but no matching objects found! The extension filter at the bottom right also looks a bit strange now!


I’ve never seen the OR syntax used in the extension filter, just a semi colon separated list

e.g.

*.xlsx;*.xls

 


I’ve never seen the OR syntax used in the extension filter, just a semi colon separated list

e.g.

*.xlsx;*.xls

 

Many thanks, that worked!  :-)

To my defense, I got the “OR” from FMEs own documentation!
 

 



To my defense, I got the “OR” from FMEs own documentation!

 

The pitfalls of reading the manual!