Skip to main content
Solved

How to create a folder with an Attributevalue as name and write an Excel file to the new folder at the end of the Workspace


I want to create an Workflow in a Workspace where i load data from a Transformer and then create an Folder with the Name of the Attributevalue and then write the other Data in an Excel file in the created folder.

 

To Create the folder with PythonCaller was easy, but i have no idea how i use the Attribute Value in the Excel writer Destination.

Best answer by nielsgerrits

While this can be done using a classic writer, try it using a FeatureWriter as this is more intuitive. Edit the dataset path and add the attribute with the folder name in it. No PythonCaller needed.2023-06-14_09h24_20

View original
Did this help you find an answer to your question?

4 replies

nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • June 14, 2023

While this can be done using a classic writer, try it using a FeatureWriter as this is more intuitive. Edit the dataset path and add the attribute with the folder name in it. No PythonCaller needed.2023-06-14_09h24_20


  • Author
  • June 14, 2023

@nielsgerrits​  Thanks for the quick reply.

On the desktop it works, but on the FME server the folder and file is not created.

Do you have any idea why or what to do on the server?


nielsgerrits
VIP
Forum|alt.badge.img+54
spb33 wrote:

@nielsgerrits​  Thanks for the quick reply.

On the desktop it works, but on the FME server the folder and file is not created.

Do you have any idea why or what to do on the server?

Where do you want to write to, local server or network drive?

Does the FME Server user have the correct permissions to write to this location?

When you need to write to a network drive, address it as UNC path. Also add that path as a Resource under Files & Connections.

2023-06-14_11h14_41


  • Author
  • June 14, 2023

I want to write to the local fme server storage that it listed under Ressources.

The System Path is: '$(FME_SHAREDRESOURCE_xx_xx)/DataPers' and i want to create the folder Persn-(AttributeValue) and write the Excel file in it.

The User has the permissions to write to this location, because there are other Workspace with Static Path an dynamic file names that write with a classic writer to the location. Further with a Pythoncaller i can create the Folder.

 

**Solved**

The FeatureWriter can't handle the System Path, with UNC path it works!

 

@nielsgerrits​  Thank you


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings