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

  • June 14, 2023
  • 4 replies
  • 360 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2937 replies
  • 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
  • 2 replies
  • 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+60
  • 2937 replies
  • 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?

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
  • 2 replies
  • 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