Skip to main content

Hi,

 

I want to create a published parameter where the user get to choose their own excelfile in the workspace as the reader. The writer is set to read a column with the header "Fastighet". But the input attribute can vary depending on how the user are writing it e.g. "Fastigheter" "fastighet" "Fastigheterna" and so on. So my first problem is that I really dont know how to set up the configuration for the publish parameter so the user can choose which excelfile they want. And secondly how do I make the script understand how to read the header name/column name and what sheet to choose.

One strategy could be to use a dynamic Excel reader (choose "Single merged feature type" when creating the reader) followed by an AttributeExploder. You can then use a StringSearcher on the attribute "_attr_name" to look for an attribute name starting with e.g. "fastighet" (not case sensitive). The associated value can then be found in "_attr_value".

For the filename, simply create a published parameter of type "Filename (existing)".


Reply