Skip to main content
Best Answer

excel writer filename from attribute

  • June 23, 2020
  • 6 replies
  • 208 views

raabster
Contributor
Forum|alt.badge.img+4

Hi!

 

I'm trying to have FME to output an excelfile and use an attribute as it's filename. Can't get it to work! In the parameters settings for the writer I enter the folder in the "Destination Fanout Directory" and as the Fanout Expression i enter:

@Value(ATTRIBUTE THAT I WANT TO USE HERE).xlsx

This gives me one ".xlsx", that does not open, and one file with the correct filename but without a file ending (xlsx).

 

Anyone who can point me in the right direction?

Using fme desktop 2020.

 

UPDATE:

The error was my own fault. The attribute value contained a : (colon) which a filename can not include. Sort this out and the filename get produced as expected.

Best answer by raabster

The error was my own fault. The attribute value contained a : (colon) which a filename can not include. Sort this out and the filename get produced as expected.

 

Thank you @daveatsafe for your patience along the way!

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.

6 replies

daveatsafe
Safer
Forum|alt.badge.img+20
  • Safer
  • June 23, 2020

Hi @raabster,

What version of FME are you using, and what is the value of the attribute you are using for the filename?


raabster
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • June 24, 2020

Hi @raabster,

What version of FME are you using, and what is the value of the attribute you are using for the filename?

Hi @daveatsafe, I'm using FME(R) 2020.0.2.1 (20200511 - Build 20238 - WIN64). The attribute-name/header is simply E, and the value of the attribute is TEST.

 

Thanks for your answer :)


raabster
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • June 24, 2020

Hi @raabster,

What version of FME are you using, and what is the value of the attribute you are using for the filename?

so in my fanout expression is simpy: @Value(E).xlsx

and I thought that would produce the file TEST.xlsx


daveatsafe
Safer
Forum|alt.badge.img+20
  • Safer
  • June 24, 2020

so in my fanout expression is simpy: @Value(E).xlsx

and I thought that would produce the file TEST.xlsx

Hi @raabster,

I'm sorry, I was not able to reproduce the problem. Would you mind adding a Recorder just before the Excel writer in your workspace? Run the workspace and send me the resulting FFS file, so I can test using your data. If you don't want to make the data public, you can send to me directly: .

 


raabster
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • June 25, 2020

Hi @raabster,

I'm sorry, I was not able to reproduce the problem. Would you mind adding a Recorder just before the Excel writer in your workspace? Run the workspace and send me the resulting FFS file, so I can test using your data. If you don't want to make the data public, you can send to me directly: .

 

Hi @daveatsafe!

I found the problem. I intended to set the attribute E to TEST but I did not. So the old data was still there and that string contained a colon which a filename can not include. So the error was 100% my own mistake. Sorry to have botherd you but at least my problem got sorted :D

 

So all in all - it works :)


raabster
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • Best Answer
  • June 25, 2020

The error was my own fault. The attribute value contained a : (colon) which a filename can not include. Sort this out and the filename get produced as expected.

 

Thank you @daveatsafe for your patience along the way!