Solved

excel writer filename from attribute

  • 23 June 2020
  • 6 replies
  • 15 views

Badge +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.

icon

Best answer by raabster 25 June 2020, 09:02

View original

6 replies

Userlevel 2
Badge +17

Hi @raabster,

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

Badge +4

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 :)

Badge +4

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

Userlevel 2
Badge +17

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: .

 

Badge +4

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 :)

Badge +4

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!

Reply