Skip to main content

I have a template file (Excel) saved in a library and I have an unrelated list containing columns for Request number and title.

Each time a new list item is created, I would like to save a copy of the Excel file in a library on the same site, with the filename in format <Request number> - <title>.xlsx or something similar.

The template and destination library can actually even be the same library if that makes things easier, no big deal.  Eventually this folder will have a bunch of Excel files in it with different filenames.

I was excited about using Document Generation for this, but I'm stuck on Nintex 2013 and do not have access to the Document Generation action.

I've looked into the "Copy item" and "Copy to sharepoint" but that doesn't seem to be what I need, nor does "Query Excel Services".

Any ideas?

I think you're going to need to use a web service to accomplish this.  You can look at the CopyIntoItemsLocal method.  You would modify the output url to get the file name you want for the new document.  


Thanks Brendan.  I'm new at this, but I think I can get through it with some help.  I've attached screenshots of what I'm entering.  This workflow action is completing, but the file isn't getting copied.

I just tried a test to see if I can get the file to copy over from one library to another.  The SourceUrl variable is basically just the path to the .xlsx file.  The DestUrl variable is a path into a folder that exists and my assumption is that it would keep the same filename.

The workflow details says it's "Completed" but as far as I can see, nothing is getting copied.  I'm sure I'm doing something wrong, but my Google-Fu isn't helping me on this one.


I also tried replacing the SourceUrl with the absolute path to the document and the DestUrl with an absolute path and a test.xlsx filename, which also didn't work (but the workflow completed!).


Try logging the url's when the workflow runs so you can see exactly what is being fed to the action.  Also, have you tried using the "Run Now" within the Call web service action and manually putting in the url's to see if it would work?  


I just built this quick test and it worked.  In taking a second look at your variables, it doesn't look like you are including the name of the file itself.  That is part of the path.  

Workflow


Brendan, thanks a ton, your method worked perfectly!


8b4839ce6c9de6717fe79d01d2b82d5b.jpg


Brendan,

I'm going to bring this up because I hope this is a simple question : 

In my build string that is getting stored in variable DestinationUrl, one of the parameters for the url is the title of the item.

The file is copying and getting renamed correctly, however when I try to use DestinationUrl as a link in my task notification to link to the file, any spaces that the user put in the title of the list item is breaking the link.

For instance : for an item with a title of "Test 5555", I have this for my build string

https://sitename/Assessments/Level%200%20-%20{ItemProperty:Title}.xlsx

Store Result in : DestinationUrl

My file that gets copied over has a file name of "Level 0 - Test 5555.xlsx" with spaces and everything, it's fine.

However, when I use the workflow variable "DestinationUrl" as a reference in my task notification, the link breaks when it gets to the space between "Test" and "5555.xlsx" like this:

I tried putting quotes around the URL, which I believe fixes the issue with the spaces in the link, but that breaks the build string and doesn't copy the file over correctly.

Any ideas?


You'll need to format the url to replace the space with %20.  You can use a RegEx action to replace the text.  Use the pattern s.  Make the DestinationURL the input, then save it back to the same variable. 

199926_pastedImage_3.png


I don't know why I didn't find this the first time I searched, but I'm going to try this : 

 


I like your way better than the other method I found.  Works great!  Thanks again!  I'll buy you a beer if you're ever in downtown Columbus, OH.


images?q=tbn:ANd9GcTu3ouBcVQB-LAZIkzN0G7FLN40vreHkqaxVrRdA08kPFGHBfyz


Yeah, those are some good options too.  


Hi, how it does work with attachments files?? I mean, I want to copy attachments from a list to a specifit document library folder, so I don't know how to get FileReafLef property from this files.

Reply