XLS Reader - pushing filename through flow variables to CSV Writer?

Hi,

I have an XLS Reader node which reads a spreadsheet into my network. I then perform many transformations on the data before writing out the new data with an CSV Writer node. I want to capture and modify the filename as well, e.g.:

filename.xls   ->   filename - modified.csv

I have not been able to get the filename into a flow variable that I can then modify and use in the writer. I cannot apply workflow variables either in this node. Can anyone help me with the proper nodes-workflow?

The XLS Reader does not seem to expose the file folder-location. I have tried using a File Upload node to put the file into a variable, but although I set the XLS_LOCATION flow variable in the XLS Reader node, the select file to read is not filled in, and the node still asks me to select a file to read from.

If I apply a (global) workflow variable to the XLS_LOCATION variable in the XLS Reader, the dialog says that it is controlled by the variable, but still asks me for a file to read - does not seem to pick that up either.

thanks,

JP

Hi JP, 

Have you tried exporting the XLS file name as a flow variable from the flow variables tab in the XLS Reader node?  In the text field next to the combobox that you would use to overwrite your node settings, you can choose a variable name and then have that setting exported as a new variable with that name.  Subsequently, it shoudl be fairly easy to reconstruct the file name as you need it.

Aaron

Hi Aaron,


Thanks for the help. I was able to figure out what was happening. The filename in the "select file to read" text box on the property page does not update with the filename from the flow variable, so I was thinking that it was not updated. It was. I use the FileUpload node and modify the filename as needed fine. I guess I could probably get rid of it, but it's working and I'm moving on.

thanks,

JP