Skip to main content
Solved

excel writer filename from attribute


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!

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

6 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • 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
daveatsafe wrote:

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
daveatsafe wrote:

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+19
  • Safer
  • June 24, 2020
raabster wrote:

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
daveatsafe wrote:

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!


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